Skip to content

Table.Head won't accept Table.Row to allow pinCols to work #462

Description

@AndrewBrough

Simple typescript error that won't allow Table.Head to accept a single child. MDN specifies that the table head pattern should look like table > thead > tr > th, but Table.Head expects only an array of children.

Also, the story for pinned columns doesn't actually use Table.Head, it uses raw HTML instead. I'm not sure if there was a reason for this, but I'd expect to be able to use the react components here in the same pattern eg.

<Table>
  <Table.Head>
    <Table.Row>
       <th>Pinned Header</th>
       <th>Header</th>
       <th>Header</th>
       <th>Header</th>
    </Table.Row>
    <Table.Body>
      <Table.Row>
        <td>data</td>
        <td>data</td>
        <td>data</td>
        <td>data</td>
       <Table.Row>
    </Table.Body>
  </Table.Head>
</Table>

^ this doesn't work, you have to replace Table.Head with the plain html thead instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions