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
Ensure we are not freezing data when the static prop is used (#3779)
This PR fixes an issue where a listbox with the `static` option had a
delayed `selected` value.
This was happening because of 2 reasons:
1. The `isSelected` function had stale data
2. We use a "frozen value", but we shouldn't do that when the listbox
options are using the `static` option.
The frozen data is used to prevent UI jumps when you have transitions.
For example, if you fade out the listbox when closing then if you select
an option the selected state (and a checkmark for example) would move
around to the newly selected option while the listbox is fading out. To
prevent that we "freeze" the selected value until the listbox is fully
closed. This behaves the same as a native select element.
Fixes: #3778
## Test plan
Tested the fix with the reproduction from the issue:
https://github.com/user-attachments/assets/fbbc2ec3-321b-4e66-b0fc-df5a483dfbba
---------
Co-authored-by: Jordan Pittman <[email protected]>
0 commit comments