inputValue on ComboBox doesn't seem to work #1664
Unanswered
LukeBurke99
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a derived variable for the currently selected label:
let inputValue = $derived(selected?.label);
And I also have a onOpenChange method on the Combobox.Root element:
onOpenChange={(o) => { if (!o) inputValue = 'asdasdasda'; }}
However, nothing actually happens when this value is changed. The idea behind this is that the user can delete whatever text they want from the input, BUT if they don't deselect the item/select another one, the item that is selected should be shown again when the dropdown closes.
I would prefer to do this on focus lost but regardless of that, the value never changes when the dropdown closes, it always stays as whatever the user changed the value to.
Am I doing something wrong or is there any way this could be a new feature that can be passed in as a parameter? something like 'onCloseShowSelected'
version: 2.8.10
Beta Was this translation helpful? Give feedback.
All reactions