Skip to content

Commit

Permalink
sanitize filter model
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Jun 12, 2024
1 parent 295aaca commit ea06e14
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ export const useGridFilter = (
);

const getFilterState = React.useCallback<GridFilterApi['getFilterState']>(
(filterModel) => {
(inputFilterModel) => {
const filterModel = sanitizeFilterModel(
inputFilterModel,
props.disableMultipleColumnsFiltering,
apiRef,
);
const isRowMatchingFilters =
props.filterMode === 'client'
? buildAggregatedFilterApplier(filterModel, apiRef, props.disableEval)
Expand All @@ -329,7 +334,7 @@ export const useGridFilter = (
filterModel,
};
},
[apiRef, props.filterMode, props.disableEval],
[props.disableMultipleColumnsFiltering, props.filterMode, props.disableEval, apiRef],
);

const filterApi: GridFilterApi = {
Expand Down

0 comments on commit ea06e14

Please sign in to comment.