Griddle icon indicating copy to clipboard operation
Griddle copied to clipboard

Does customRowComponent support <tr> <td>

Open tungwaiyip opened this issue 10 years ago • 4 comments

When I turn on useCustomRowComponent, I find that the table is rendered very differently. Normally it is a HTML <table>. If I turn on useCustomRowComponent, it becomes just nested div. In fact it strip away any <tr>, <td> that my class renders. I have a render function that return a list of <td> inside a <tr>. What is wrong with that? Why does Griddle produce a table?

tungwaiyip avatar Dec 15 '15 01:12 tungwaiyip

You would need to pass in a custom grid component that handles rendering the table body to accomplish that. Maybe this should be an option in v1.

legomind avatar Jan 09 '16 04:01 legomind

Sorry about this confusion! It's poor naming on our part. Can you try using useCustomTableRow and customTableRow instead and see if that is better? We should have called customRow something else earlier on as it's a repeated div rather than a table row (which is really helpful in some scenarios -- but not this one :smile:). We've tried to make this a lot clearer in the customization in 1.0 ..

1.0 adds a lot more customization, in general -- these docs are not quite ready yet but a list of the components that can be overrode is available here

ryanlanciaux avatar Jan 09 '16 05:01 ryanlanciaux

useCustomTableRow is not a thing yet :/

abologna-r7 avatar Feb 17 '17 19:02 abologna-r7

Griddle 1.0 has been released along with the customization options mentioned. Please see the customization documentation for more info :)

An example of this customization in use is available here. Closing this for now but please feel free to open a new issue if any problems are encountered :+1:

ryanlanciaux avatar Feb 24 '17 11:02 ryanlanciaux