Skip to content

Commit 9b67281

Browse files
committed
[O2B-1502] Don't set any defaults in the filter as it will conflict with the query/reset logic. Just set the value afterwards
1 parent f247a6f commit 9b67281

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/public/components/Filters/LhcFillsFilter/StableBeamFilterModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export class StableBeamFilterModel extends SelectionModel {
2222
* Constructor
2323
* @param {boolean} value if true sets the filter's starting value to be true.
2424
*/
25-
constructor(value = false) {
25+
constructor() {
2626
super({ availableOptions: [{ value: true }, { value: false }],
27-
defaultSelection: [{ value }],
27+
defaultSelection: [{ value: false }],
2828
multiple: false,
2929
allowEmpty: false });
3030
}

lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ export class LhcFillsOverviewModel extends OverviewPageModel {
3131
super();
3232

3333
this._filteringModel = new FilteringModel({
34-
hasStableBeams: new StableBeamFilterModel(stableBeamsOnly),
34+
hasStableBeams: new StableBeamFilterModel(),
3535
});
3636

3737
this._filteringModel.observe(() => this._applyFilters(true));
3838
this._filteringModel.visualChange$.bubbleTo(this);
3939

4040
this.reset(false);
41+
42+
if (stableBeamsOnly) {
43+
this._filteringModel.get('hasStableBeams').setStableBeamsOnly(true);
44+
}
4145
}
4246

4347
/**

0 commit comments

Comments
 (0)