From 39c9abba66dcf754855c7556661dec0e666fbad0 Mon Sep 17 00:00:00 2001 From: Amir Saif Date: Mon, 8 Jul 2024 15:24:37 +0530 Subject: [PATCH] feat(mui5):Update filter options to case insensitive --- packages/common/src/dual-list-select/dual-list-select.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/src/dual-list-select/dual-list-select.js b/packages/common/src/dual-list-select/dual-list-select.js index 4c82e188b..5564fffb1 100644 --- a/packages/common/src/dual-list-select/dual-list-select.js +++ b/packages/common/src/dual-list-select/dual-list-select.js @@ -39,10 +39,10 @@ const DualListSelectCommon = (props) => { }); const leftValues = rest.options - .filter((option) => !rest.input.value.includes(option.value) && option.label.includes(state.filterOptions)) + .filter((option) => !rest.input.value.includes(option.value) && option.label.toLowerCase().includes(state.filterOptions.toLowerCase())) .sort((a, b) => (state.sortLeftDesc ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label))); const rightValues = rest.options - .filter((option) => rest.input.value.includes(option.value) && option.label.includes(state.filterValue)) + .filter((option) => rest.input.value.includes(option.value) && option.label.toLowerCase().includes(state.filterValue.toLowerCase())) .sort((a, b) => (state.sortRightDesc ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label))); const handleOptionsClick = (event, value) => handleOptionClick(event, value, leftValues, true, dispatch, state);