TableNG: Move useCallback up in TablePanel (#108080)
This commit is contained in:
@@ -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 = (
|
||||
<TableNG
|
||||
height={tableHeight}
|
||||
|
||||
Reference in New Issue
Block a user