From 875befa9359c816d1f0a358c6ef1047b03a5ffde Mon Sep 17 00:00:00 2001 From: "damian.przygodzki" Date: Tue, 27 Jun 2017 08:18:32 +0200 Subject: [PATCH] #864 Sticky filter hardcoded --- src/components/app/DocumentList.js | 7 +++++++ src/components/filters/Filters.js | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/app/DocumentList.js b/src/components/app/DocumentList.js index a96d7c433..472be139a 100644 --- a/src/components/app/DocumentList.js +++ b/src/components/app/DocumentList.js @@ -251,6 +251,12 @@ class DocumentList extends Component { clickOutsideLock: !!value }) } + + clearStaticFilters = () => { + const {dispatch, windowType, viewId} = this.props; + + dispatch(push('/window/' + windowType)); + } // FETCHING LAYOUT && DATA ------------------------------------------------- @@ -498,6 +504,7 @@ class DocumentList extends Component { filterData={layout.filters} filtersActive={filters} updateDocList={this.handleFilterChange} + clearStaticFilters={this.clearStaticFilters} />} Filters: @@ -154,12 +156,18 @@ class Filters extends Component { dropdownToggled={this.dropdownToggled} /> } - {!!staticFilters.length && + + + { + //TODO: temporary solution to refactor. + // Structure data/layout corrupted. + } + {filter && filter.static && ( - } + )} )