react icon indicating copy to clipboard operation
react copied to clipboard

SVG icons hidden unconditionally in DataTable headers due to overly broad CSS selector

Open MrChrisW opened this issue 1 month ago • 1 comments

Problem

SVG icons that are not related to sorting (e.g., custom IconButton components) are being hidden in table headers in DataTable because of an overly broad CSS rule, such as:

.Table th svg { visibility: hidden; }

This causes all SVGs in headers to be hidden by default, not just sort icons. This makes it impossible to display custom SVG icons or IconButton components in DataTable column headers.

Expected

  • Only sort icons (e.g., those with .TableSortIcon) should be hidden by default; arbitrary SVGs should be visible and usable in headers.

Actual

  • All SVG elements inside table headers are hidden, breaking custom header content.

Proposed fix

  • Update CSS rules so only sort icons are affected (e.g., .TableSortIcon { visibility: hidden; }) and do not hide all SVGs.

This breaks customization and is blocking use-cases such as column actions or indicators.

MrChrisW avatar Dec 08 '25 05:12 MrChrisW

Thanks for the issue, could you provide some info on where you're seeing the hidden icons?

jonrohan avatar Dec 08 '25 17:12 jonrohan