diff --git a/frontend/src/Components/Filter/Builder/FilterBuilderModalContent.js b/frontend/src/Components/Filter/Builder/FilterBuilderModalContent.js index ed3bc2409..62c3f0197 100644 --- a/frontend/src/Components/Filter/Builder/FilterBuilderModalContent.js +++ b/frontend/src/Components/Filter/Builder/FilterBuilderModalContent.js @@ -132,6 +132,7 @@ class FilterBuilderModalContent extends Component { filterBuilderProps, isSaving, saveError, + onCancelPress, onModalClose } = this.props; @@ -190,7 +191,7 @@ class FilterBuilderModalContent extends Component { - @@ -220,6 +221,7 @@ FilterBuilderModalContent.propTypes = { dispatchDeleteCustomFilter: PropTypes.func.isRequired, onSaveCustomFilterPress: PropTypes.func.isRequired, dispatchSetFilter: PropTypes.func.isRequired, + onCancelPress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/Filter/FilterModal.js b/frontend/src/Components/Filter/FilterModal.js index 750d1ed48..729f380e7 100644 --- a/frontend/src/Components/Filter/FilterModal.js +++ b/frontend/src/Components/Filter/FilterModal.js @@ -34,6 +34,17 @@ class FilterModal extends Component { }); } + onCancelPress = () => { + if (this.state.filterBuilder) { + this.setState({ + filterBuilder: false, + id: null + }); + } else { + this.onModalClose(); + } + } + onModalClose = () => { this.setState({ filterBuilder: false, @@ -67,6 +78,7 @@ class FilterModal extends Component { :