mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-27 19:42:11 +10:00
Fix resolving number of selected secondary filters
This commit is contained in:
parent
2ba05aa8f1
commit
58a828a05a
1 changed files with 8 additions and 3 deletions
|
|
@ -41,11 +41,16 @@ class MainPanel extends Component {
|
|||
} = this.props;
|
||||
|
||||
const isSearchFiltersPanelOpen = !!secondaryFilters && this.state.isSearchFiltersPanelOpen;
|
||||
|
||||
const secondaryFilterKeys = secondaryFilters ? Object.keys(secondaryFilters) : [];
|
||||
// resolve list of secondary filter url params
|
||||
const secondaryFilterParams = Object.entries(customURLParamToConfig)
|
||||
.filter(param => secondaryFilterKeys.includes(param[1]))
|
||||
.map(e => e[0]);
|
||||
|
||||
const searchFiltersPanelSelectedCount = !secondaryFilters
|
||||
? 0
|
||||
: Object.keys(customURLParamToConfig)
|
||||
.map(key => urlQueryParams[key])
|
||||
.filter(param => !!param).length;
|
||||
: secondaryFilterParams.map(key => urlQueryParams[key]).filter(param => !!param).length;
|
||||
|
||||
const searchFiltersPanelProps = !!secondaryFilters
|
||||
? {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue