Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.
This repository was archived by the owner on Jan 15, 2022. It is now read-only.

Table only accepts nested <Td> elements #122

@okcoker

Description

@okcoker

Currently it seems as the Table only accepts <Reactable.Td> elements.

I am trying to customize the <Reactable.Th> columns to have the labels, along with some "unsafe" html. Something like this:

         <Table
                sortable={true}>
                <Thead>
                    <Tr>
                        <Th><span>header1</span></Th>
                        <Th><span>header2</span></Th>
                        <Th><span>header3</span></Th>
                        <Th><span>header4</span></Th>
                        <Th><span>header5</span></Th>
                    </Tr>
                </Thead>
                { body_rows }
            </Table>

This renders my table with the appropriate data, but under an empty row. Seems as though adding my own Thead and Th elements causes an empty row and is completely ignored by Reactable. body_rows is an array of Tr elements but as soon as I try to be semantically correct and add a Tbody around it, no table is rendered. If the only children are Tr's things are fine but I want to be able to customize cell content. Some of my problems I think revolve around this.

I'll see if I can fix some things because I really like this library so far, but I at least wanted to document this as a ticket first.

Thanks for listening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions