From 79ca05b80a71d4b2c8c5e63115435a34ad58778c Mon Sep 17 00:00:00 2001 From: Stephane Bisson Date: Mon, 12 Feb 2018 11:35:19 -0500 Subject: [PATCH] RCLFilters: make sticky filters default and current value equal Bug: T186930 Change-Id: I6d2f5bd4b979fd1b66f3e37b8757daf93dd8b4a9 --- .../dm/mw.rcfilters.dm.FilterGroup.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js index bb29b36191..eda8c0d36b 100644 --- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js +++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js @@ -266,17 +266,17 @@ } } + if ( this.isSticky() ) { + // If this group is sticky, then change the default according to the + // current selection. + this.defaultParams = this.getParamRepresentation( this.getSelectedState() ); + } + if ( changed || this.active !== active || this.currSelected !== item ) { - if ( this.isSticky() ) { - // If this group is sticky, then change the default according to the - // current selection. - this.defaultParams = this.getParamRepresentation( this.getSelectedState() ); - } - this.active = active; this.currSelected = item; -- 2.20.1