Skip to content

Commit

Permalink
bugfix: new filter shouldn't be enlarged if there is already an enlar…
Browse files Browse the repository at this point in the history
…ged filter (#93)

* new filter shouldn't be enlarged if there is already an enlarged filter, fix #92

* remove trailing spaces
  • Loading branch information
rinick authored and heshan0131 committed Jun 7, 2018
1 parent 966d698 commit 389303c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/reducers/vis-state-updaters.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ export function setFilterUpdater(state, action) {
freeze: true,
fieldIdx
};
const enlargedFilterIdx = state.filters.findIndex(f => f.enlarged);
if (enlargedFilterIdx > -1 && enlargedFilterIdx !== idx) {
// there should be only one enlarged filter
newFilter.enlarged = false;
}

newState = {
...state,
Expand Down

0 comments on commit 389303c

Please sign in to comment.