New element added to ic-data-table when sorting a truncated column #2819
Labels
data-table component
The generic component, includes both the web component and the React component
type: bug 🐛
Something isn't working
Summary of the bug
When sorting a table that contains a cell with a truncated value (only occurs when using
truncationPattern="tooltip"
), the cell content shifts to the right, although it still truncates correctly and displays the tooltip.The reason for this is down to the fact that when this happens, a new
ic-tooltip
element is being added into the cell (with no height so it is not visible), which shifts the visible content over to accommodate it. See screenshots below for visual example. Interestingly, every time a new column is sorted, a new tooltip element is added.🪜 How to reproduce
📸 Screenshots or code
Before sorting (see only one tooltip in devtools)
After sorting (now two tooltips, visible one pushed to the side)
Sorting a second column (three tooltips, content pushed even further)
🧐 Expected behaviour
I suggest that if cell content is already wrapped in a tooltip, then do not create an additional element.
The text was updated successfully, but these errors were encountered: