-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Typeahead is not working correctly with virtualised select #3567
Comments
It's possible that #3535 has broken the typeahead functionality on virtualized lists. If you test your reproduction with
|
Yup, downgrading works for now. Thanks! |
@diegohaz Sorry for the ping, but any news on this? I’d love to upgrade 🙏 I don’t know much about the internals, but I can attempt to fix this if you point me in the right direction |
Not yet. Stabilizing virtualization is one of my next tasks, and this issue is part of that. |
Thank you for the update! |
Current behavior
I know the
<SelectRenderer />
component is still experimental, but while implementing it, I discovered that typeahead isn’t working for items that aren’t rendered. I noticed #3535 and tried to update to newer version but it still didn’t work. My use case doesn’t allow for rendering combobox, because the performance isn’t as great as with selects (as noted in #3451)On the topic of typeahead, I’m also thinking if matching the
value
of the item (as opposed to the option label users see) is the right choice, because for example with countries,Switzerland
might have a value ofch
and typingSwi…
wouldn’t work.Steps to reproduce the bug
Expected behavior
The select has knowledge of all items using the
defaultItems
prop to<SelectProvider />
(oruseSelectStore
) so it should be able to guesstimate the position in the list and scroll.Workaround
—
Possible solutions
We should probably use the
items
state here if its length is greater than the length ofrenderedItems
:ariakit/packages/ariakit-react-core/src/composite/composite-typeahead.ts
Lines 132 to 137 in 771ba3e
The text was updated successfully, but these errors were encountered: