Skip to content

Commit 9086dab

Browse files
Team filter fix (#196)
1 parent 874cb7a commit 9086dab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/app/features/variables/pickers/OptionsPicker/OptionsPicker.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ export const optionPickerFactory = <Model extends VariableWithOptions | Variable
5353
};
5454
}
5555

56-
const isMfeTeamFilter = state.fnGlobalState.FNDashboard && state.fnGlobalState.metadata.teams.length;
56+
const p = getVariablesState(rootStateKey, state).optionsPicker;
57+
const isMfeTeamFilter =
58+
state.fnGlobalState.FNDashboard && state.fnGlobalState.metadata.teams.length && p.id === 'team';
5759

5860
const teamFilter = isMfeTeamFilter
5961
? state.fnGlobalState.metadata.teams.map((t) => ({
@@ -63,8 +65,6 @@ export const optionPickerFactory = <Model extends VariableWithOptions | Variable
6365
}))
6466
: [];
6567

66-
const p = getVariablesState(rootStateKey, state).optionsPicker;
67-
6868
return {
6969
picker: { ...p, ...(teamFilter.length && { options: [...p.options, ...teamFilter] }) },
7070
mfeState: state.fnGlobalState,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy