Reset combobox value on enter #3482
Unanswered
sahra-marie
asked this question in
Q&A
Replies: 1 comment 1 reply
-
In a ComboBox, if you type a value yourself, the SelectedOption is not valid. You need to bind to the Value. See https://www.fluentui-blazor.net/Combobox#defaultexamples |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I would need help resetting the combobox value to an empty one.
Scenario:
Adding tags to an object
The user should be able to select a tag (just a string) from the combobox or type their own and click enter to submit.
After that, the combobox should then be emptied so that it's ready for the next input.
However, setting the value or selected option to an empty string does not clear the previously made selection.
I managed to do it via js (searching for the input field inside the combobox and resetting its value), but I'm still wondering if there is a way to achive this more easily without js?
Simplified Code:
Beta Was this translation helpful? Give feedback.
All reactions