Open okcoker opened 9 years ago
Yeah, there's a fair amount of (admittedly hackish) checking of types of child components - that line you linked is almost definitely the place to start.
If you work at it and get stuck, I always like pull requests with failing tests :smile:
So it looks like React.addons.TestUtils has a function to determine the type of a React component. Might be good to just directly copy+paste the source of that function (since we don't want to require people include the entire testutils into their page)
I'm trying to customize <Th>
to have a checkbox, a 'select all' type of thing and having the same problem.
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:This renders my table with the appropriate data, but under an empty row. Seems as though adding my own
Thead
andTh
elements causes an empty row and is completely ignored by Reactable.body_rows
is an array ofTr
elements but as soon as I try to be semantically correct and add aTbody
around it, no table is rendered. If the only children areTr
'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.