Skip to content

Commit ffdaf3e

Browse files
authored
fix(4882): groupby values should be added to both builderConfig and queryBuilder (#5025)
1 parent b9ed6f6 commit ffdaf3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/timeMachine/reducers/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,12 @@ export const timeMachineReducer = (
842842

843843
// but for the group aggregate, want to set default values
844844
if (builderAggregateFunctionType === 'group') {
845-
draftQuery.builderConfig.tags[
846-
index
847-
].values = draftQuery.builderConfig.tags
845+
const initValues = draftQuery.builderConfig.tags
848846
.map(t => t.key)
849847
.filter(x => !!x)
848+
849+
draftQuery.builderConfig.tags[index].values = initValues
850+
draftState.queryBuilder.tags[index].values = initValues
850851
}
851852

852853
draftQuery.builderConfig.tags[

0 commit comments

Comments
 (0)