Skip to content

Commit d510a18

Browse files
committed
enforce feature toggle
1 parent 90de9f9 commit d510a18

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/scenes/src/variables/adhoc/AdHocFiltersVariable.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,6 @@ export class AdHocFiltersVariable
323323
this.restoreOriginalFilter(filter);
324324
}
325325
});
326-
327-
this.setState({ applicabilityEnabled: false });
328326
};
329327
};
330328

@@ -738,6 +736,10 @@ export class AdHocFiltersVariable
738736
}
739737

740738
public async _verifyApplicability() {
739+
if (!this.state.applicabilityEnabled) {
740+
return;
741+
}
742+
741743
const filters = [...this.state.filters, ...(this.state.originFilters ?? [])];
742744
const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : undefined;
743745

packages/scenes/src/variables/groupby/GroupByVariable.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ export class GroupByVariable extends MultiValueVariable<GroupByVariableState> {
244244
if (this.state.defaultValue) {
245245
this.restoreDefaultValues();
246246
}
247-
248-
this.setState({ applicabilityEnabled: false });
249247
};
250248
};
251249

@@ -297,6 +295,10 @@ export class GroupByVariable extends MultiValueVariable<GroupByVariableState> {
297295
}
298296

299297
public async _verifyApplicability() {
298+
if (!this.state.applicabilityEnabled) {
299+
return;
300+
}
301+
300302
const queries = getQueriesForVariables(this);
301303
const value = this.state.value;
302304

0 commit comments

Comments
 (0)