filters always collapsed on page load
This commit is contained in:
parent
f2aeb8e187
commit
ab0e1a4127
1 changed files with 6 additions and 8 deletions
|
@ -117,18 +117,16 @@ function useFragment() {
|
|||
details.open = false;
|
||||
} else {
|
||||
const pieces =
|
||||
frag == 'summary' ? ['require_artsummary', 'hide_filters'] :
|
||||
frag == 'colourexamples' ? ['require_colourexample', 'hide_filters'] :
|
||||
frag == 'flatexamples' ? ['require_flatexample', 'hide_filters'] :
|
||||
frag == 'sketchexamples' ? ['require_sketchexample', 'hide_filters'] :
|
||||
frag == 'iconexamples' ? ['require_iconexample', 'hide_filters'] :
|
||||
frag == 'curated' ? ['require_curated', 'hide_filters'] :
|
||||
frag.split(';');
|
||||
frag == 'summary' ? ['require_artsummary'] :
|
||||
frag == 'colourexamples' ? ['require_colourexample'] :
|
||||
frag == 'flatexamples' ? ['require_flatexample'] :
|
||||
frag == 'sketchexamples' ? ['require_sketchexample'] :
|
||||
frag == 'iconexamples' ? ['require_iconexample'] :
|
||||
frag == 'curated' ? ['require_curated'] : frag.split(';');
|
||||
const set = new Set(pieces);
|
||||
const re = /^(require|exclude)_|hide_filters/;
|
||||
if (pieces.every(x => re.test(x))) {
|
||||
allBoxes.forEach(b => b.checked = set.has(b.id));
|
||||
// details.open = !set.has('hide_filters');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue