fix(client): fix filter default value (#3544)

This commit is contained in:
Junyi 2024-02-21 21:24:43 +08:00 committed by GitHub
parent bdc90155c4
commit 14b6c5a628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,8 +27,10 @@ export const Filter: any = observer(
});
useEffect(() => {
field.initialValue = fieldSchema.defaultValue;
}, []);
if (fieldSchema.defaultValue) {
field.initialValue = fieldSchema.defaultValue;
}
}, [fieldSchema.defaultValue]);
return (
<div className={className}>
<FilterContext.Provider