Skip to content

Commit

Permalink
Merge pull request #1878 from target/fix-multi-select
Browse files Browse the repository at this point in the history
ui/materialselect: filter selected on multi-select
  • Loading branch information
mastercactapus authored Aug 30, 2021
2 parents 0c7920e + 4011704 commit a5ea762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/app/selection/MaterialSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function MaterialSelect(
onInputChange(input)
}

const multi = multiple ? { multiple: true } : {}
const multi = multiple ? { multiple: true, filterSelectedOptions: true } : {}

useEffect(() => {
if (!focus) setInputValue(getInputLabel())
Expand All @@ -123,7 +123,7 @@ export default function MaterialSelect(
if (value && Array.isArray(value)) {
options = [...options, ...value]
} else if (!inputValue && value && !Array.isArray(value) && !options.length) {
options = [value, ...options]
options = [value]
}

const customCSS: Record<string, string> = {
Expand Down

0 comments on commit a5ea762

Please sign in to comment.