Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom data attribute to table headers or table cells #878

Closed
hctslm opened this issue Dec 8, 2016 · 5 comments
Closed

custom data attribute to table headers or table cells #878

hctslm opened this issue Dec 8, 2016 · 5 comments

Comments

@hctslm
Copy link

hctslm commented Dec 8, 2016

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

@AllenFang
Copy link
Owner

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??

@mauretanec
Copy link

@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?

@AllenFang
Copy link
Owner

@mauretanec, is not possible in react-bootstrap-table, but I think I can try to support this feature(Add custom attribute on TD)

@AllenFang
Copy link
Owner

@hctslm, released on v2.8.3 and check this example.

@paypay43
Copy link

paypay43 commented May 9, 2020

@AllenFang - how do we do this for the header column so we can add col="scope" to it for a11y

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

No branches or pull requests

4 participants