Skip to content

Commit f257e49

Browse files
author
NarrowsProjects
committed
fix issue of mcReproducible always being active
1 parent 8170a80 commit f257e49

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,13 @@ const pasteButtonOption = (model) => {
174174
/**
175175
* A indicates if any filters are currently active on the page
176176
*
177-
* @param {FilteringModel} filteringModel the filtering model
177+
* @param {FilteringModel} model the filtering model
178178
* @returns {Component} the active filters indicator
179179
*/
180-
const activeFilterIndicator = (filteringModel) => {
180+
const activeFilterIndicator = (model) => {
181+
// Sometimes, the overview model is passed to filterPanelPopover instead of the filteringmodel (e.g. envirionments)
182+
const { filteringModel = model } = model;
183+
181184
const hasActiveFilters = filteringModel.isAnyFilterActive();
182185
const innerText = `Filters ${hasActiveFilters ? 'Active' : 'Inactive'}`;
183186

lib/public/views/Runs/Overview/RunsWithQcModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class RunsWithQcModel extends RunsOverviewModel {
7878

7979
this._observablesQcFlagsSummaryDependsOn$ = null;
8080
// This filter instance will be added as a sub-filter for a MultiCompositionFilter and a GaqFilter later.
81-
this._mcReproducibleAsNotBad = new ToggleFilterModel();
81+
this._mcReproducibleAsNotBad = new ToggleFilterModel(false, true);
8282

8383
this._runDetectorsSelectionModel = new RunDetectorsSelectionModel();
8484
this._runDetectorsSelectionModel.bubbleTo(this);

0 commit comments

Comments
 (0)