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:
@@ -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'];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user