Clear custom invalid value in combobox on close/blur #1042
Unanswered
martinpengellyphillips
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
-
👋 hello again. If a combobox is closed/blurred with a custom value typed in the input, how do I revert the input value shown back to the last selected valid value (or just clear it)? This is so that there is not confusion between what the input shows and what the actual value (stored by
onSelect
) is on submission.I thought it might be something to do with
isCustomValue
andallowCustomValue
, but I can't seem to make those do anything.I can work around this by tracking
inputValue
andselectedValue
explicitly, comparing them inonInteractOutside
and resetting as needed. But is there a better way?Beta Was this translation helpful? Give feedback.
All reactions