Skip to content

Commit 20030d5

Browse files
author
NarrowsProjects
committed
fix: add page nav click reset functionallity back to FilteringModel
1 parent 4ee9530 commit 20030d5

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

lib/public/components/Filters/common/FilteringModel.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,14 @@ export class FilteringModel extends Observable {
144144
* @returns {undefined}
145145
*/
146146
setFilterFromURL(notify = false) {
147-
const { params: { page = '', filter = {} } } = this._router;
147+
const { params: { page = '', filter } } = this._router;
148148

149149
if (this._pageIdentifier === page) {
150+
if (!filter) {
151+
this.reset();
152+
return;
153+
}
154+
150155
const unknownFilters = [];
151156
const setFilterErrors = [];
152157

@@ -179,9 +184,10 @@ export class FilteringModel extends Observable {
179184
} else {
180185
this._warnings.delete('Unknown Filters');
181186
}
182-
if (notify) {
183-
this.notify();
184-
}
187+
}
188+
189+
if (notify) {
190+
this.notify();
185191
}
186192
}
187193

0 commit comments

Comments
 (0)