Skip to content

Commit

Permalink
fix(Selector): Fixed bug when all options are default options DEV-53
Browse files Browse the repository at this point in the history
  • Loading branch information
giubatt committed May 19, 2021
1 parent 46d500d commit 038fc2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Selector/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,15 @@ const Selector = ({
justifyContent: "start",
}}
onClick={() => {
if (isSelectorFilled) {
if (selectedItems.length > 0) {
handleBulkAction(SELECTOR_BULK_ACTIONS.DESELECT_ALL)
return true
}

handleBulkAction(SELECTOR_BULK_ACTIONS.SELECT_ALL)
}}
>
{isSelectorFilled ? "Deselect all" : "Select all"}
{selectedItems.length > 0 ? "Deselect all" : "Select all"}
</Button>
</li>
)}
Expand Down

0 comments on commit 038fc2e

Please sign in to comment.