mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 03:55:57 +08:00
fix: query operator (#2924)
This commit is contained in:
parent
5bdb0e84d1
commit
7f05ce3d05
@ -132,12 +132,20 @@ export const useQueryOperations: UseQueryOperations = ({ query, index }) => {
|
||||
if (JSON.stringify(operators) === JSON.stringify(initialOperators)) return;
|
||||
|
||||
setOperators(initialOperators);
|
||||
handleChangeOperator(initialOperators[0].value);
|
||||
|
||||
const isCurrentOperatorAvailableInList = initialOperators
|
||||
.map((operator) => operator.value)
|
||||
.includes(aggregateOperator);
|
||||
|
||||
if (!isCurrentOperatorAvailableInList) {
|
||||
handleChangeOperator(initialOperators[0].value);
|
||||
}
|
||||
}, [
|
||||
dataSource,
|
||||
initialDataSource,
|
||||
panelType,
|
||||
operators,
|
||||
aggregateOperator,
|
||||
handleChangeOperator,
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user