fix: default value for multiple select cannot be set (#2031)

This commit is contained in:
katherinehhh 2023-06-14 10:56:45 +08:00 committed by GitHub
parent 3332a488ca
commit b64ce6a2b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,8 +88,11 @@ const InternalSelect = connect(
}
const toValue = (v) => {
if (['tags', 'multiple'].includes(props.mode) || props.multiple) {
if (v) {
return toArr(v);
}
return undefined;
}
return v;
};
return (