Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#742 Clear single overlay field CONDITIONALLY
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed May 18, 2017
1 parent f457d53 commit 510be75
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/components/filters/FiltersItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,17 @@ class FiltersItem extends Component {
const {applyFilters, closeFilterMenu} = this.props;
const {filter} = this.state;

if(filter && !filter.parameters[0].value){
this.handleClear();
}else {
applyFilters(filter, () => {
closeFilterMenu();
});
if(
filter &&
filter.parametersLayoutType === 'singleOverlayField' &&
!filter.parameters[0].value
){
return this.handleClear();
}

applyFilters(filter, () => {
closeFilterMenu();
});
}

handleClear = () => {
Expand Down

0 comments on commit 510be75

Please sign in to comment.