ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Internal issue 2481 - Data Table - Release individual table components

Open ticket-sync[bot] opened this issue 1 year ago • 2 comments

For more complex table requirements e.g. virtualisation of rows, sortable rows or even just displaying unstructured data in a table format, It would be useful to be able to use individual table components to build a more custom table whilst still replicating the data table styling i.e.

  • Table
  • TableRow
  • TableCell
  • TableBody
  • TableHead

ticket-sync[bot] avatar Feb 20 '24 15:02 ticket-sync[bot]

leaving for now to have further discussion

ad9242 avatar Sep 12 '24 09:09 ad9242

comment\suggestion from user:

"The more I think about ICDS support for Table elements the more I am coming to the opinion we should not have ICDS alternatives for the native HTML elements and I would like to suggest an alternative strategy.

  • Much like the AG Grid theme, provide a CSS class that can be applied to a regular HTML Table. Then use the cascade to style the header and rows of the table. https://github.com/mi6/ic-design-system/issues/1650
  • Supply an ic-sortable component that is agnostic of the actual data being sorted. When the user changes sort order, via a tri-state button, it dispatches a custom event to inform the view-model but also resets any other ic-sortabels in the table head for single column sorting.
  • Supply an ic-paginator component, similar to the ic-pagination-bar but again agnostic of the data being paged. Instead, when the user changes page or page size a custom event is dispatched to report the event and supply the detail. The view-model or server can respond appropriately. Such components could be employed for both client- and server-side rendering use cases."

ad9242 avatar Mar 28 '25 10:03 ad9242