Skip to content

Commit

Permalink
fix(comp:select): clicking an option created by input selects undefind (
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Mar 4, 2024
1 parent 98d0595 commit fa02551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/select/src/Select.tsx
Expand Up @@ -106,7 +106,7 @@ export default defineComponent({
})

const handleOptionClick = (option: SelectData) => {
changeSelected(getKey.value(option))
changeSelected(getKey.value(option) ?? option.key)
;(props.allowInput || !props.multiple) && clearInput()
if (!props.multiple) {
setOverlayOpened(false)
Expand Down

0 comments on commit fa02551

Please sign in to comment.