From 189acf0b8dd66b968dcdc4554edf9cd2899c1a04 Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Sat, 3 Jun 2023 10:07:52 -0400 Subject: [PATCH] lint --- .../components/headerFiltering/GridHeaderFilterAdornment.tsx | 2 +- .../src/components/headerFiltering/GridHeaderFilterCell.tsx | 2 +- packages/grid/x-data-grid/src/models/gridFilterOperator.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterAdornment.tsx b/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterAdornment.tsx index 5851d274080b7..56371f4d1331e 100644 --- a/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterAdornment.tsx +++ b/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterAdornment.tsx @@ -103,7 +103,7 @@ GridHeaderFilterAdornment.propTypes = { }).isRequired, operators: PropTypes.arrayOf( PropTypes.shape({ - getApplyFilterFn: PropTypes.func.isRequired, + getApplyFilterFn: PropTypes.func, getValueAsString: PropTypes.func, headerLabel: PropTypes.string, InputComponent: PropTypes.elementType, diff --git a/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx b/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx index cdb410304fb41..50b67b07896aa 100644 --- a/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx +++ b/packages/grid/x-data-grid-pro/src/components/headerFiltering/GridHeaderFilterCell.tsx @@ -285,7 +285,7 @@ GridHeaderFilterCell.propTypes = { colIndex: PropTypes.number.isRequired, filterOperators: PropTypes.arrayOf( PropTypes.shape({ - getApplyFilterFn: PropTypes.func.isRequired, + getApplyFilterFn: PropTypes.func, getValueAsString: PropTypes.func, headerLabel: PropTypes.string, InputComponent: PropTypes.elementType, diff --git a/packages/grid/x-data-grid/src/models/gridFilterOperator.ts b/packages/grid/x-data-grid/src/models/gridFilterOperator.ts index 3efe8903d158c..59bed3ea6afa5 100644 --- a/packages/grid/x-data-grid/src/models/gridFilterOperator.ts +++ b/packages/grid/x-data-grid/src/models/gridFilterOperator.ts @@ -21,7 +21,7 @@ type ApplyFilterInterface = * @param {GridColDef} column The column from which we want to filter the rows. * @returns {null | ((params: GridCellParams) => boolean)} The function to call to check if a row pass this filter item or not. */ - getApplyFilterFn: ( + getApplyFilterFn?: ( filterItem: GridFilterItem, column: GridColDef, ) => null | ((params: GridCellParams) => boolean); @@ -34,7 +34,7 @@ type ApplyFilterInterface = * @param {GridColDef} column The column from which we want to filter the rows. * @returns {null | ((value: V, row: R, column: GridColDef) => boolean)} The function to call to check if a row pass this filter item or not. */ - getApplyFilterFnV7: ( + getApplyFilterFnV7?: ( filterItem: GridFilterItem, column: GridColDef, ) => null | GridApplyFilterV7;