mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 08:49:02 +08:00
fix: dashboard variable is fixed (#2633)
This commit is contained in:
parent
bd248c46b2
commit
5ad367a0fc
@ -5,7 +5,7 @@ import query from 'api/dashboard/variables/query';
|
|||||||
import { commaValuesParser } from 'lib/dashbaordVariables/customCommaValuesParser';
|
import { commaValuesParser } from 'lib/dashbaordVariables/customCommaValuesParser';
|
||||||
import sortValues from 'lib/dashbaordVariables/sortVariableValues';
|
import sortValues from 'lib/dashbaordVariables/sortVariableValues';
|
||||||
import { map } from 'lodash-es';
|
import { map } from 'lodash-es';
|
||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { memo, useCallback, useEffect, useState } from 'react';
|
||||||
import { IDashboardVariable } from 'types/api/dashboard/getAll';
|
import { IDashboardVariable } from 'types/api/dashboard/getAll';
|
||||||
|
|
||||||
import { variablePropsToPayloadVariables } from '../utils';
|
import { variablePropsToPayloadVariables } from '../utils';
|
||||||
@ -130,7 +130,7 @@ function VariableItem({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getOptions();
|
getOptions();
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, [variableData, existingVariables]);
|
||||||
|
|
||||||
const handleChange = (value: string | string[]): void => {
|
const handleChange = (value: string | string[]): void => {
|
||||||
if (
|
if (
|
||||||
@ -201,4 +201,4 @@ function VariableItem({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default VariableItem;
|
export default memo(VariableItem);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user