-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Autocomplete] Make highlight change work better #23718
[Autocomplete] Make highlight change work better #23718
Conversation
ce53d5d
to
4a4d3ce
Compare
27c01fd
to
615427d
Compare
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.
@TakumaKira I have added a new test case to assert that we are moving in the right direction. The current tradeoff is to not reset the scroll if the option stays the same. It might not be enough, we will see :). One step at a time.
@TakumaKira I will ping you if we get a new issue on the same topic after these changes :D |
@oliviertassinari OK, thanks! |
What does it do?
filteredOptions
and executeonHighlightChange
only when the highlighted option is changednull
(highlighted index should be calculated properly even if input value isnull
)Why is it needed?
filteredOptions.length === 0
to check highlight change is not enough iffilteredOptions
is changed asynchronously.Related issue(s)/PR(s)
Fix #22170