You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love to be able to access the isExpanded state of the Combobox.
Current Behavior
There is no way to access it other than reading data-attributes[data-reach-combobox-popover] in the DOM. (WRONG)
Suggested Solution
Expose the read-only prop by hook or render prop.
Who does this impact? Who is this for?
Everyone who wants to use the state.
In my example, I would sometimes want to resort or change the list data after a Combobox item was selected. I only want to update the list when it's closed otherwise it'd lead to some twitter-like UX 😁
It would also allow me to work around #395 by only changing state in the onDismiss prop of the Dialog when the Combobox is expanded. This would probably still mess up the focusing because of the unmount/remount but it'd be something.
Describe alternatives you've considered
Checking data-attributes.
Actual solution
While writing this issue, I found the useComboboxContexthook in the docs that already exposes isExpanded 🤦♂️
I decided to post it anyhow to cross-reference and in the hope, it may be useful to someone.
The text was updated successfully, but these errors were encountered:
🚀 Feature request
I'd love to be able to access the
isExpanded
state of theCombobox
.Current Behavior
There is no way to access it other than reading data-attributes
[data-reach-combobox-popover]
in the DOM. (WRONG)Suggested Solution
Expose the read-only prop by hook or render prop.
Who does this impact? Who is this for?
Everyone who wants to use the state.
In my example, I would sometimes want to resort or change the list data after a
Combobox
item was selected. I only want to update the list when it's closed otherwise it'd lead to some twitter-like UX 😁It would also allow me to work around #395 by only changing state in the
onDismiss
prop of the Dialog when theCombobox
is expanded. This would probably still mess up the focusing because of the unmount/remount but it'd be something.Describe alternatives you've considered
Checking data-attributes.
Actual solution
While writing this issue, I found the
useComboboxContext
hook in the docs that already exposesisExpanded
🤦♂️I decided to post it anyhow to cross-reference and in the hope, it may be useful to someone.
The text was updated successfully, but these errors were encountered: