Skip to content

Commit 642bf92

Browse files
fix: allow no functions to be selected in query builder custom aggregation (#3587)
1 parent 363687b commit 642bf92

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/timeMachine/actions/queryBuilderThunks.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {queryBuilderFetcher} from 'src/timeMachine/apis/QueryBuilderFetcher'
55

66
// Utils
77
import {event} from 'src/cloud/utils/reporting'
8-
import {prohibitedDeselect} from 'src/shared/copy/notifications'
98
import {isFlagEnabled} from 'src/shared/utils/featureFlag'
109

1110
// API
@@ -55,7 +54,6 @@ import {
5554
setFunctions,
5655
} from 'src/timeMachine/actions/queryBuilder'
5756
import {setBuckets} from 'src/buckets/actions/creators'
58-
import {notify} from 'src/shared/actions/notifications'
5957

6058
// Constants
6159
import {AGG_WINDOW_AUTO} from 'src/timeMachine/constants/queryBuilder'
@@ -355,12 +353,7 @@ export const multiSelectBuilderFunction = (name: string) => (
355353
// add clicked to selected
356354
dispatch(setFunctions([...functionNames, name]))
357355
} else {
358-
if (functions.length > 1) {
359-
// if more than one function is selected, remove clicked from selected
360-
dispatch(setFunctions(functionNames.filter(n => n != name)))
361-
} else {
362-
dispatch(notify(prohibitedDeselect()))
363-
}
356+
dispatch(setFunctions(functionNames.filter(n => n != name)))
364357
}
365358
}
366359

0 commit comments

Comments
 (0)