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

No way of adding a data attr to table cells #132

Closed
anthonydillon opened this issue May 29, 2020 · 2 comments
Closed

No way of adding a data attr to table cells #132

anthonydillon opened this issue May 29, 2020 · 2 comments

Comments

@anthonydillon
Copy link
Contributor

As part of our testing, we would like to provide or automatically assign a data-test attr to a table cell. This is currently not possible with the current component.

@huwshimi
Copy link
Collaborator

huwshimi commented Jun 1, 2020

@anthonydillon you can pass additional html attributes to the cell object and they will be passed to the cell.

So you could do something like this:

{
    content: last_login,
    "data-date": last_login
}

And the cell will become something like:

<td role="gridcell" data-date="2020-01-01">2020-01-01</td>

We need to document that this can be done.

@anthonydillon
Copy link
Contributor Author

Ah cool thanks.

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

No branches or pull requests

2 participants