Commit 336faab
authored
Ensure that you can close the Combobox initially (#1148)
* ensure that you can close the combobox initially
The issue is that `onInput` fires on every keystroke, and we also
handled `onChange` which is triggered on blur in Vue.
This means that the moment we blur, we also called the `handleChange`
code to re-open the combobox because we want to open the combobox if
something changes when the user starts typing.
To fix this, we will splitup the logic so that it will only open the
combobox on input but not on change.
* update changelog1 parent 475568b commit 336faab
File tree
2 files changed
+6
-1
lines changed- packages/@headlessui-vue/src/components/combobox
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
502 | 506 | | |
503 | 507 | | |
504 | 508 | | |
| |||
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
519 | | - | |
| 523 | + | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
| |||
0 commit comments