From 70fcd166feaba61295d2c9816a301e893a539583 Mon Sep 17 00:00:00 2001 From: Paul Marbach Date: Tue, 7 Oct 2025 11:22:37 -0400 Subject: [PATCH] [release-12.1.3] Table: Avoid thrown error due to internal React issue (#111945) Table: Fix hooks issue ordering issue --- 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 d5bf34dd869..e8f60441d7c 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 = (