europa-component-library icon indicating copy to clipboard operation
europa-component-library copied to clipboard

feat(table): add id and headers - FRONT-4260

Open emeryro opened this issue 1 year ago • 1 comments

  • New twig parameter id, to set a unique id for the table (used for accessibility) This global id is used to generate a unique id for each of the table headers Example
id: 'table-id',
  • New twig parameter headers for each table header and table cell. It is used to setup a relation between a cell and one or more header, especially for multi header tables. Example
rows: [
    {
      data: [
        {
          label: 'Administators in Competition Law',
          headers: 'table-id-1',
          ...
        },
        {
          label: 'European Commission',
          headers: 'table-id-3 table-id-5',
          ...
        },
    }
]

emeryro avatar Feb 21 '24 11:02 emeryro

🚀 Deployed on https://ecl-preview-3251--europa-component-library.netlify.app

github-actions[bot] avatar Feb 21 '24 12:02 github-actions[bot]