Skip to content

Commit

Permalink
Merge pull request #1473 from AmirSaif/updateCaseSensitivityOfFilterO…
Browse files Browse the repository at this point in the history
…ptionsv2

feat(mui5):Update filter options to case insensitive
  • Loading branch information
Hyperkid123 authored Jul 8, 2024
2 parents 9c693a4 + 39c9abb commit 83a4737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/common/src/dual-list-select/dual-list-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 83a4737

Please sign in to comment.