fix: prevent combobox from over-filtering options on focus (#4829)

This commit is contained in:
skynono 2026-05-13 22:21:24 +08:00 committed by GitHub
parent 3e588b4d4f
commit 51b5cbe1bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,7 +176,7 @@ export function ComboboxInput({
if (!open) setOpen(true)
}}
onFocus={() => {
setSearchValue(allowCustomValue ? value : '')
setSearchValue(allowCustomValue && !selectedOption ? value : '')
setOpen(true)
}}
onKeyDown={handleKeyDown}