fix: edit form unchanged should not appear unSaveed warning when cloas modal (#3920)

This commit is contained in:
katherinehhh 2024-04-04 22:42:05 +08:00 committed by GitHub
parent 59c1aea942
commit e7187e536d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,7 @@ const InternalAssociationSelect = observer(
onFieldChange('*', (fieldPath: any) => { onFieldChange('*', (fieldPath: any) => {
const linkageFields = filterAnalyses(field.componentProps?.service?.params?.filter) || []; const linkageFields = filterAnalyses(field.componentProps?.service?.params?.filter) || [];
if (linkageFields.includes(fieldPath?.props?.name) && field.value) { if (linkageFields.includes(fieldPath?.props?.name) && field.value) {
props.onChange(field.initialValue); field.setValue(field.initialValue);
setInnerValue(field.initialValue); setInnerValue(field.initialValue);
} }
}); });