-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(aria/multi): Add methods to public api #32237
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
base: main
Are you sure you want to change the base?
Conversation
96691eb to
e8300da
Compare
| } | ||
|
|
||
| /** Opens the combobox. */ | ||
| open(nav?: {first?: boolean; last?: boolean; selected?: boolean}) { |
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.
We should discuss with the team how these navigation options are surfaced to developers. When it was an internal impl detail, it was fine to just call open({first: true}), etc. But now that it is part of the public api, it would be good to see if folks think there is a more intuitive way to expose this
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.
That's fair. I will add that the context-menu example appears to call _pattern.first() because there was no option to open and navigate to first, so at least providing it in the open (or simply making the default first: true) will remove the need to expose navigation separately. But again, just having it clearly navigate to first would possibly be enough.
| } | ||
|
|
||
| /** Selects an item in the combobox popup. */ | ||
| select(opts: {item?: V; commit?: boolean; close?: boolean} = {}) { |
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.
We shouldn't expose item, or close as options here. Not sure what we should do about commit, but will likely need to go a different route than surfacing it as a option this way
No description provided.