From f19b2ef429d6a2338d1aad7edc4dd7b2584cdaba Mon Sep 17 00:00:00 2001 From: Paul Marbach Date: Mon, 14 Jul 2025 13:08:50 -0400 Subject: [PATCH] TableNG: Move useCallback up in TablePanel (#108080) --- public/app/plugins/panel/table/table-new/TablePanel.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/app/plugins/panel/table/table-new/TablePanel.tsx b/public/app/plugins/panel/table/table-new/TablePanel.tsx index 78f97127d9c..5af5472f19b 100644 --- a/public/app/plugins/panel/table/table-new/TablePanel.tsx +++ b/public/app/plugins/panel/table/table-new/TablePanel.tsx @@ -34,6 +34,10 @@ export function TablePanel(props: Props) { const theme = useTheme2(); const panelContext = usePanelContext(); + const _getActions = useCallback( + (frame: DataFrame, field: Field, rowIndex: number) => getCellActions(frame, field, rowIndex, replaceVariables), + [replaceVariables] + ); const frames = hasDeprecatedParentRowIndex(data.series) ? migrateFromParentRowIndexToNestedFrames(data.series) : data.series; @@ -57,11 +61,6 @@ export function TablePanel(props: Props) { const enableSharedCrosshair = panelContext.sync && panelContext.sync() !== DashboardCursorSync.Off; - const _getActions = useCallback( - (frame: DataFrame, field: Field, rowIndex: number) => getCellActions(frame, field, rowIndex, replaceVariables), - [replaceVariables] - ); - const tableElement = (