Skip to content

Commit

Permalink
fix(selectfeaturesbutton): change order of operations if clearAfterSe…
Browse files Browse the repository at this point in the history
…lect
  • Loading branch information
simonseyock committed Jan 28, 2022
1 parent 9ce529d commit c875baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Button/SelectFeaturesButton/SelectFeaturesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ const SelectFeaturesButton: React.FC<SelectFeaturesButtonProps> = ({
}

const key = selectInteraction.on('select', e => {
onFeatureSelect?.(e);
if (clearAfterSelect) {
features.clear();
}
onFeatureSelect?.(e);
});

return () => {
Expand Down

0 comments on commit c875baa

Please sign in to comment.