From 23798ddc6b1bd03f0dcb5e1248c7a8aef7b28815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:40:22 +0100 Subject: [PATCH] Remove debounced chart resize (#17376) Remove debounced chart resize --- .../components/GraphWidgetBarChart.tsx | 12 ++---------- .../components/GraphWidgetLineChart.tsx | 7 +------ 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx index b594e7f00e..7b0d7a4f7f 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx @@ -108,15 +108,6 @@ export const GraphWidgetBarChart = ({ const [chartHeight, setChartHeight] = useState(0); const containerRef = useRef(null); - const debouncedSetChartDimensions = useDebouncedCallback( - (width: number, height: number) => { - setChartWidth(width); - setChartHeight(height); - }, - - 300, - ); - const setActiveBarTooltip = useSetRecoilComponentState( graphWidgetBarTooltipComponentState, ); @@ -363,7 +354,8 @@ export const GraphWidgetBarChart = ({ { - debouncedSetChartDimensions(width, height); + setChartWidth(width); + setChartHeight(height); }} /> (null); const [chartWidth, setChartWidth] = useState(0); - const debouncedSetChartWidth = useDebouncedCallback( - (width: number) => setChartWidth(width), - 300, - ); - const formatOptions: GraphValueFormatOptions = { displayType, decimals, @@ -291,7 +286,7 @@ export const GraphWidgetLineChart = ({ > debouncedSetChartWidth(width)} + onDimensionChange={({ width }) => setChartWidth(width)} />