Skip to content

Commit 790d76b

Browse files
author
GuustMetz
committed
chore: add filteringModel to SimulationPassesPerLhcPeriodOverviewModel
1 parent 2f6fcf1 commit 790d76b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

lib/public/views/SimulationPasses/PerLhcPeriodOverview/SimulationPassesPerLhcPeriodOverviewModel.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { OverviewPageModel } from '../../../models/OverviewModel.js';
1515
import { buildUrl, RemoteData } from '/js/src/index.js';
1616
import { ObservableData } from '../../../utilities/ObservableData.js';
1717
import { getRemoteData } from '../../../utilities/fetch/getRemoteData.js';
18+
import { FilteringModel } from '../../../components/Filters/common/FilteringModel.js';
1819

1920
/**
2021
* Simulation Passes Per LHC Period overview model
@@ -26,6 +27,14 @@ export class SimulationPassesPerLhcPeriodOverviewModel extends OverviewPageModel
2627
constructor() {
2728
super();
2829

30+
this._filteringModel = new FilteringModel();
31+
32+
this._filteringModel.visualChange$.bubbleTo(this);
33+
this._filteringModel.observe(() => {
34+
this._pagination.silentlySetCurrentPage(1);
35+
this.load();
36+
});
37+
2938
this._namesFilterModel = new TextTokensFilterModel();
3039
this._registerFilter(this._namesFilterModel);
3140

@@ -49,6 +58,15 @@ export class SimulationPassesPerLhcPeriodOverviewModel extends OverviewPageModel
4958
}
5059
}
5160

61+
/**
62+
* Return the model managing all filters
63+
*
64+
* @return {FilteringModel} the filtering model
65+
*/
66+
get filteringModel() {
67+
return this._filteringModel;
68+
}
69+
5270
/**
5371
* @inheritdoc
5472
*/

0 commit comments

Comments
 (0)