-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
When adding async data to the combobox, the scroll jumps to the top. #2785
Comments
@juanjinario Is |
Hey, gonna close this for now but one thing you could do if you still experience this is use the <Combobox by="id" … other props here…>
…
</Combobox> |
Thanks, I going to test, but I can not understand how it works (by id) |
Internally, the combobox uses the entire object passed to This is discussed more in the documentation |
I want to have an infinite scroll functionality with the combobox, and when reaching the bottom, I want to add new data. However, this doesn't work because the scroll jumps to the top.
What package within Headless UI are you using?
@headlessui/vue
What version of that package are you using?
1.7.16
What browser are you using?
Chrome
Reproduction URL
The issue can be reproduced by loading the initial data from an endpoint and adding new data while scrolling. It jumps to the top, which doesn't make sense; it should keep the scroll in its current position and add the new elements. If I change the ComboboxOption to a div, the behavior is correct (But I lose other functionalities of the Combobox).
Describe your issue
My code is the following.
The text was updated successfully, but these errors were encountered: