File tree Expand file tree Collapse file tree
components/Filters/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,12 +39,17 @@ export class FilteringModel extends Observable {
3939 /**
4040 * Reset the filters
4141 *
42+ * @param {boolean } [notify=false] if true the model notifies its observers
4243 * @return {void }
4344 */
44- reset ( ) {
45+ reset ( notify = false ) {
4546 for ( const model of this . _filterModels ) {
4647 model . reset ( ) ;
4748 }
49+
50+ if ( notify ) {
51+ this . notify ( ) ;
52+ }
4853 }
4954
5055 /**
@@ -53,14 +58,14 @@ export class FilteringModel extends Observable {
5358 * @return {object } the normalized values
5459 */
5560 get normalized ( ) {
56- const normlizedFilters = { } ;
61+ const normalizedFilters = { } ;
5762 for ( const [ filterKey , filter ] of Object . entries ( this . _filters ) ) {
5863 if ( filter && ! filter . isEmpty ) {
59- normlizedFilters [ filterKey ] = filter . normalized ;
64+ normalizedFilters [ filterKey ] = filter . normalized ;
6065 }
6166 }
6267
63- return expandQueryLikeNestedKey ( normlizedFilters ) ;
68+ return expandQueryLikeNestedKey ( normalizedFilters ) ;
6469 }
6570
6671 /**
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const filtersToggleContent = (
4545 {
4646 onclick : ( ) => filteringModel . resetFiltering
4747 ? filteringModel . resetFiltering ( )
48- : filteringModel . reset ( ) ,
48+ : filteringModel . reset ( true ) ,
4949 disabled : ! filteringModel . isAnyFilterActive ( ) ,
5050 } ,
5151 'Reset all filters' ,
Original file line number Diff line number Diff line change 1010 * granted to it by virtue of its status as an Intergovernmental Organization
1111 * or submit itself to any jurisdiction.
1212 */
13- import { FilteringModel } from '../../../ components/Filters/common/FilteringModel.js' ;
14- import { SelectionFilterModel } from '../../../ components/Filters/common/filters/SelectionFilterModel.js' ;
15- import { TextTokensFilterModel } from '../../../ components/Filters/common/filters/TextTokensFilterModel.js' ;
16- import { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS } from '../../../ domain/enums/NonPhysicsProductionsNamesWords.js' ;
17- import { OverviewPageModel } from '../../../ models/OverviewModel.js' ;
13+ import { FilteringModel } from '../../components/Filters/common/FilteringModel.js' ;
14+ import { SelectionFilterModel } from '../../components/Filters/common/filters/SelectionFilterModel.js' ;
15+ import { TextTokensFilterModel } from '../../components/Filters/common/filters/TextTokensFilterModel.js' ;
16+ import { NON_PHYSICS_PRODUCTIONS_NAMES_WORDS } from '../../domain/enums/NonPhysicsProductionsNamesWords.js' ;
17+ import { OverviewPageModel } from '../../models/OverviewModel.js' ;
1818
1919/**
2020 * Data Passes overview model
You can’t perform that action at this time.
0 commit comments