Table Component: Improve text-wrapping behavior of cells (#82872)
* Fix text-wrapping of cells in Tables * Set wordbreak on hover for long texts without spaces
This commit is contained in:
@@ -48,7 +48,11 @@ export function useTableStyles(theme: GrafanaTheme2, cellHeightOption: TableCell
|
||||
|
||||
'&:hover': {
|
||||
overflow: overflowOnHover ? 'visible' : undefined,
|
||||
width: overflowOnHover ? 'auto !important' : undefined,
|
||||
width: overflowOnHover ? 'auto' : undefined,
|
||||
height: overflowOnHover ? 'auto' : `${rowHeight - 1}px`,
|
||||
minHeight: `${rowHeight - 1}px`,
|
||||
wordBreak: overflowOnHover ? 'break-word' : undefined,
|
||||
whiteSpace: overflowOnHover ? 'normal' : 'nowrap',
|
||||
boxShadow: overflowOnHover ? `0 0 2px ${theme.colors.primary.main}` : undefined,
|
||||
background: overflowOnHover ? background ?? theme.components.table.rowHoverBackground : undefined,
|
||||
zIndex: overflowOnHover ? 1 : undefined,
|
||||
|
||||
Reference in New Issue
Block a user