mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 01:36:10 +08:00
fix: full view chart label and checkbox issue (#3879)
This commit is contained in:
parent
2d60805b28
commit
71e487dc0c
@ -6,10 +6,10 @@ import Label from './Label';
|
||||
export const getLabel = (
|
||||
labelClickedHandler: (labelIndex: number) => void,
|
||||
): ColumnType<DataSetProps> => ({
|
||||
render: (label: string, _, index): JSX.Element => (
|
||||
render: (label, record): JSX.Element => (
|
||||
<Label
|
||||
label={label}
|
||||
labelIndex={index}
|
||||
labelIndex={record.index}
|
||||
labelClickedHandler={labelClickedHandler}
|
||||
/>
|
||||
),
|
||||
|
@ -20,10 +20,10 @@ export const getGraphManagerTableColumns = ({
|
||||
width: 50,
|
||||
dataIndex: ColumnsKeyAndDataIndex.Index,
|
||||
key: ColumnsKeyAndDataIndex.Index,
|
||||
render: (_: string, __: DataSetProps, index: number): JSX.Element => (
|
||||
render: (_: string, record: DataSetProps): JSX.Element => (
|
||||
<CustomCheckBox
|
||||
data={data}
|
||||
index={index}
|
||||
index={record.index}
|
||||
checkBoxOnChangeHandler={checkBoxOnChangeHandler}
|
||||
graphVisibilityState={graphVisibilityState}
|
||||
/>
|
||||
|
@ -59,20 +59,21 @@ function WidgetGraphComponent({
|
||||
[data, name],
|
||||
);
|
||||
|
||||
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
||||
boolean[]
|
||||
>(localStoredVisibilityStates);
|
||||
|
||||
useEffect(() => {
|
||||
if (!lineChartRef.current) return;
|
||||
|
||||
localStoredVisibilityStates.forEach((state, index) => {
|
||||
lineChartRef.current?.toggleGraph(index, state);
|
||||
});
|
||||
setGraphsVisibilityStates(localStoredVisibilityStates);
|
||||
}, [localStoredVisibilityStates]);
|
||||
|
||||
const { setLayouts, selectedDashboard, setSelectedDashboard } = useDashboard();
|
||||
|
||||
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
||||
boolean[]
|
||||
>(localStoredVisibilityStates);
|
||||
|
||||
const { featureResponse } = useSelector<AppState, AppReducer>(
|
||||
(state) => state.app,
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user