Merge pull request #680 from smartxworks/fix/select

fix(arco/Select): when defaultValue is empty, it is handled as undefined
This commit is contained in:
tanbowensg 2023-01-19 10:41:43 +08:00 committed by GitHub
commit e638b0de68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ export const Select = implementRuntimeComponent({
customStyle,
callbackMap,
mergeState,
defaultValue = '',
defaultValue,
subscribeMethods,
} = props;
const {
@ -92,7 +92,7 @@ export const Select = implementRuntimeComponent({
} = getComponentProps(props);
const [value, setValue] = useStateValue(
defaultValue,
defaultValue || undefined,
mergeState,
updateWhenDefaultValueChanges,
undefined,