fix: filter removeNullConditions (#1329)

This commit is contained in:
anuoua 2023-01-05 12:46:18 +08:00 committed by GitHub
parent 72e9533b7d
commit 346af57b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ export const useFilterFieldProps = ({ options, service, params }) => {
options,
onSubmit(values) {
// filter parameter for the block
const defaultFilter = removeNullCondition(params.filter);
const defaultFilter = params.filter;
// filter parameter for the filter action
const filter = removeNullCondition(values?.filter);
@ -126,7 +126,7 @@ export const useFilterFieldProps = ({ options, service, params }) => {
}
},
onReset() {
const filter = removeNullCondition(params.filter);
const filter = params.filter;
service.run({ ...service.params?.[0], filter, page: 1 });
field.title = t('Filter');
},