-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(list): add activeItem getter #5704
base: main
Are you sure you want to change the base?
Changes from all commits
3a71352
f23e6eb
04f9786
888b0cf
c3a5c0e
470710b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,14 @@ export class List extends LitElement { | |
activatePreviousItem(): ListItem | null { | ||
return this.listController.activatePreviousItem(); | ||
} | ||
|
||
/** | ||
* Retrieves the first activated item of the array of items. | ||
* | ||
* @return A record of the first activated item including the item and the | ||
* index of the item or `null` if none are activated. | ||
*/ | ||
get activeItem() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you move this above next to the other |
||
return this.listController.activeItem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should expose the |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "array of items, or null." to be more explicit