Skip to content

Commit

Permalink
fix cell value type in quick filtering v7
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Nov 3, 2023
1 parent 83b9475 commit 456018f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/grid/x-data-grid/src/colDef/gridStringOperators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const getGridStringQuickFilterFn = tagInternalFilter(
return null;
}
const filterRegex = new RegExp(escapeRegExp(value), 'i');
return (columnValue): boolean => {
return (_, row, column, apiRef): boolean => {
const columnValue = apiRef.current.getRowFormattedValue(row, column);
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const buildAggregatedQuickFilterApplier = (
}

const applier = appliers[v];
let value = apiRef.current.getRowFormattedValue(row, column);
let value = apiRef.current.getRowValue(row, column);

if (applier.fn === null) {
continue;
Expand Down

0 comments on commit 456018f

Please sign in to comment.