You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the combo box allowing custom value and no options candidate, editing the value then click on enter should just submit the form.
Reproduction?
Open console
Type whatever in the input box
Hit "enter"
Notice that the first hit doesn't submit the form, it needs 2 hits.
I think this is because that whenever the input value has changed, regardless if it actually has options or not, it marks the combobox as "opened." So the 1st hit closes it, then the 2nd hit actual submits it.
Expected / Wanted Behavior
Without any options, simply hitting enter should just submit the form. If empty candidate is something possibly to worry about (so to mark the combobox as open), maybe add some boolean attribute that dictates the behavior on empty?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://codesandbox.io/p/sandbox/tailwind-combobox-r48pw3?file=%2Fsrc%2FApp.tsx%3A23%2C50
For the combo box allowing custom value and no options candidate, editing the value then click on enter should just submit the form.
Reproduction?
I think this is because that whenever the input value has changed, regardless if it actually has options or not, it marks the combobox as "opened." So the 1st hit closes it, then the 2nd hit actual submits it.
Expected / Wanted Behavior
Without any options, simply hitting enter should just submit the form. If empty candidate is something possibly to worry about (so to mark the combobox as open), maybe add some
boolean
attribute that dictates the behavior on empty?As always, thanks for creating this lib.
Beta Was this translation helpful? Give feedback.
All reactions