Table: Cell actions now hide properly on hover out after clicking (#112079)

fix(table): cell actions now hide properly on hover out
This commit is contained in:
Ihor Yeromin
2025-10-07 18:11:16 +02:00
committed by GitHub
parent f06a12717b
commit b579efb695
@@ -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'];
});