mirror of https://github.com/grafana/grafana.git
TableNG: Fix interpolation for actions (#104577)
This commit is contained in:
parent
85344e30c0
commit
6c0250dde2
|
|
@ -45,6 +45,7 @@ export function TableCellNG(props: TableCellNGProps) {
|
|||
getActions,
|
||||
rowBg,
|
||||
onCellFilterAdded,
|
||||
replaceVariables,
|
||||
} = props;
|
||||
|
||||
const cellInspect = field.config?.custom?.inspect ?? false;
|
||||
|
|
@ -75,8 +76,8 @@ export function TableCellNG(props: TableCellNGProps) {
|
|||
const [isHovered, setIsHovered] = useState(false);
|
||||
|
||||
const actions = useMemo(
|
||||
() => (getActions ? getActions(frame, field, rowIdx) : []),
|
||||
[getActions, frame, field, rowIdx]
|
||||
() => (getActions ? getActions(frame, field, rowIdx, replaceVariables) : []),
|
||||
[getActions, frame, field, rowIdx, replaceVariables]
|
||||
);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ export function TableNG(props: TableNGProps) {
|
|||
data,
|
||||
enableSharedCrosshair,
|
||||
showTypeIcons,
|
||||
replaceVariables,
|
||||
} = props;
|
||||
|
||||
const initialSortColumns = useMemo<SortColumn[]>(() => {
|
||||
|
|
@ -456,6 +457,7 @@ export function TableNG(props: TableNGProps) {
|
|||
styles,
|
||||
theme,
|
||||
showTypeIcons,
|
||||
replaceVariables,
|
||||
...props,
|
||||
},
|
||||
handlers: {
|
||||
|
|
@ -667,6 +669,7 @@ export function mapFrameToDataGrid({
|
|||
timeRange,
|
||||
getActions,
|
||||
showTypeIcons,
|
||||
replaceVariables,
|
||||
} = options;
|
||||
const { onCellExpand, onColumnResize } = handlers;
|
||||
|
||||
|
|
@ -815,6 +818,7 @@ export function mapFrameToDataGrid({
|
|||
getActions={getActions}
|
||||
rowBg={rowBg}
|
||||
onCellFilterAdded={onCellFilterAdded}
|
||||
replaceVariables={replaceVariables}
|
||||
/>
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ export interface TableCellNGProps {
|
|||
value: TableCellValue;
|
||||
rowBg: Function | undefined;
|
||||
onCellFilterAdded?: TableFilterActionCallback;
|
||||
replaceVariables?: InterpolateFunction;
|
||||
}
|
||||
|
||||
/* ------------------------- Specialized Cell Props ------------------------- */
|
||||
|
|
|
|||
Loading…
Reference in New Issue