custom data attribute to table headers or table cells
I want add a data-text="My own value" attribute to each cell or header for my reference to add some functionality.
How can I save my temporary data in table cell or headers, which can be used later
Thanks
hi @hctslm, You can use dataFormat to custom your column, but we cant apply custom attribute on header column. Anyway, why to want to attach some attribute on header column? what's your requirement??
@AllenFang: I think @hctslm meant attribute on TD directly. I would also like to be able to set specific attributes to TD like colspan and eventually decide whether some TD should be rendered at all.
Use case: I have four columns in table and in some rows I need to display just a message which could be easily done when one could define colspan on TD and not render the rest of TDs.
Is it possible to achieve this in react-bootstrap-table?
@mauretanec, is not possible in react-bootstrap-table, but I think I can try to support this feature(Add custom attribute on TD)
@hctslm, released on v2.8.3 and check this example.
@AllenFang - how do we do this for the header column so we can add col="scope" to it for a11y