Skip to content

Commit

Permalink
Merge pull request #785 from alexstotsky/fix-pairs-duplication
Browse files Browse the repository at this point in the history
(fix) Prevent selector items duplication
  • Loading branch information
ezewer authored Mar 19, 2024
2 parents 3fdd23c + 4cb1404 commit 56d59ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/MultiPairSelector/MultiPairSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ class MultiPairSelector extends PureComponent {
...inactivePairs,
]
: shownPairs
const preparedItems = [...new Set(items)]

return (
<MultiSelect
disabled={!pairs.length && !existingPairs.length}
items={items}
items={preparedItems}
itemRenderer={this.renderPair}
itemPredicate={this.itemPredicate}
onItemSelect={togglePair}
Expand Down

0 comments on commit 56d59ae

Please sign in to comment.