Skip to content
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

Combobox will skip at least one item if arrowdown/up in vue3 #369

Closed
APshZ opened this issue May 19, 2024 · 2 comments
Closed

Combobox will skip at least one item if arrowdown/up in vue3 #369

APshZ opened this issue May 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@APshZ
Copy link

APshZ commented May 19, 2024

Background

While using the example from https://preline.co/docs/combobox.html and put it under the vue component, find that after input value in the input field, the keydown event will trigger more than once
from Argentina step to China instead of Brazil
image
The dropdown in example also have same issue for skipping items.
https://stackblitz.com/edit/preline-v2-vue-and-vue-router?file=src%2Frouter%2Findex.ts,README.md

so i debug the prelinejs for combobox and find that every time route to the component which contains combobox, the autoinit function triggered and duplicate the combobox in window.$hsComboBoxCollection
image
which will lead to the more item count being skipped

Browser

Chrome, Edge

wait for fix or is it my code problem

@APshZ
Copy link
Author

APshZ commented May 19, 2024

and my temp solution for vue
<div class="relative" data-hs-combo-box="" @keydown.down.stop="combobox.onArrow(false)" @keydown.up.stop="combobox.onArrow(true)">

@jahaganiev
Copy link
Member

Hey @APshZ - please check out the latest version, the issue has been fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants