-
Problem report
-
Resolution: Won't Do
-
Trivial
-
None
-
6.2.7, 6.4.0
-
None
-
None
Steps to Reproduce:
- Go to Latest data page
- click on a subfilter
- In the 'Name' box search for a substring of anything
- Note that the subfilter does not reset. Was this the intent?
Thinking about usability, I think it makes the most sense to reset the subfilter selections on a filter apply. Page reset correctly resets the filters. Browser refresh should preserve filters - this looks ok.
It does look like you intended to reset the subfilters in the emptySubfilter() function, but something isn't quite right with EventListener.
The following seemed to do the trick and gives me the behavior I'd expect when clicking 'Apply':
diff --git ui/js/class.tabfilter.js ui/js/class.tabfilter.js index 23113d4..017359d 100644 --- ui/js/class.tabfilter.js +++ ui/js/class.tabfilter.js @@ -768,14 +768,7 @@ class CTabFilter extends CBaseComponent { this._filters_footer.querySelector('[name="filter_new"]') .addEventListener('click', this._events.buttonSaveAsAction); this._filters_footer.querySelector('[name="filter_apply"]') - .addEventListener('click', () => { - if (this._active_item._index == 0) { - this._events.buttonUpdateAction(); - } - else { - this._events.buttonApplyAction(); - } - }); + .addEventListener('click', this._events.buttonApplyAction); this._filters_footer.querySelector('[name="filter_reset"]') .addEventListener('click', this._events.buttonResetAction); this._filters_footer.addEventListener('click', this._events.buttonActionNotify);