From b579efb69510c1b03aee54a22963eb743bf241d8 Mon Sep 17 00:00:00 2001 From: Ihor Yeromin Date: Tue, 7 Oct 2025 18:11:16 +0200 Subject: [PATCH] Table: Cell actions now hide properly on hover out after clicking (#112079) fix(table): cell actions now hide properly on hover out --- .../src/components/Table/TableNG/styles.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/Table/TableNG/styles.ts b/packages/grafana-ui/src/components/Table/TableNG/styles.ts index 7bc859dcd62..b9e299cc939 100644 --- a/packages/grafana-ui/src/components/Table/TableNG/styles.ts +++ b/packages/grafana-ui/src/components/Table/TableNG/styles.ts @@ -148,13 +148,16 @@ export const getDefaultCellStyles: TableCellStyles = (theme, { textAlign, should ...(shouldOverflow && { minHeight: '100%' }), [getActiveCellSelector()]: { - '.table-cell-actions': { display: 'flex' }, ...(shouldOverflow && { zIndex: theme.zIndex.tooltip - 2, height: 'fit-content', minWidth: 'fit-content', }), }, + + [getHoverOnlyCellSelector()]: { + '.table-cell-actions': { display: 'flex' }, + }, }); export const getMaxHeightCellStyles: TableCellStyles = (_theme, { textAlign, maxHeight }) => @@ -252,3 +255,10 @@ export const getActiveCellSelector = memoize((isNested?: boolean) => { } return selectors.join(', '); }); + +export const getHoverOnlyCellSelector = memoize((isNested?: boolean) => { + if (IS_SAFARI_26) { + return ''; + } + return ACTIVE_CELL_SELECTORS.hover[isNested ? 'nested' : 'normal']; +});