From c750ba33af4c8a0c1299d87ccb59cf8869ebbd60 Mon Sep 17 00:00:00 2001 From: sai6855 Date: Fri, 23 Aug 2024 15:28:33 +0530 Subject: [PATCH 1/2] add key --- .../GridFilterInputMultipleSingleSelect.tsx | 20 +++++++++++-------- .../GridFilterInputMultipleValue.tsx | 20 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx index 1319523e7948..752e462bb5a4 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx @@ -108,14 +108,18 @@ function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingl onChange={handleChange} getOptionLabel={getOptionLabel} renderTags={(value, getTagProps) => - value.map((option, index) => ( - - )) + value.map((option, index) => { + const tagProps = getTagProps({ index }); + return ( + + ); + }) } renderInput={(params) => ( - value.map((option, index) => ( - - )) + value.map((option, index) => { + const tagProps = getTagProps({ index }); + return ( + + ); + }) } renderInput={(params) => ( Date: Fri, 23 Aug 2024 15:32:39 +0530 Subject: [PATCH 2/2] fix --- .../panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx | 4 ++-- .../panel/filterPanel/GridFilterInputMultipleValue.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx index 752e462bb5a4..0e1674bb1255 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx @@ -109,14 +109,14 @@ function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingl getOptionLabel={getOptionLabel} renderTags={(value, getTagProps) => value.map((option, index) => { - const tagProps = getTagProps({ index }); + const { key, ...tagProps } = getTagProps({ index }); return ( ); }) diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleValue.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleValue.tsx index 57163aa1877d..c6ed801d0f73 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleValue.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleValue.tsx @@ -66,14 +66,14 @@ function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps) onChange={handleChange} renderTags={(value, getTagProps) => value.map((option, index) => { - const tagProps = getTagProps({ index }); + const { key, ...tagProps } = getTagProps({ index }); return ( ); })