fix: multiple select should assigned null after clear value (#2822)

This commit is contained in:
katherinehhh 2023-10-13 15:46:33 +08:00 committed by GitHub
parent 3f363f67b8
commit 2a8cc10faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,8 +124,9 @@ const InternalAssociationSelect = observer((props: AssociationSelectProps) => {
value={value || innerValue} value={value || innerValue}
service={service} service={service}
onChange={(value) => { onChange={(value) => {
setInnerValue(value); const val = value?.length !== 0 ? value : null;
props.onChange?.(value); setInnerValue(val);
props.onChange?.(val);
}} }}
CustomDropdownRender={addMode === 'quickAdd' && QuickAddContent} CustomDropdownRender={addMode === 'quickAdd' && QuickAddContent}
></RemoteSelect> ></RemoteSelect>