-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Spread data-* attributes onto elements #3763
Comments
+1 in order to query Blueprint elements via |
+1 for this It would be really nice to get this out. It's extremely helpful for integration tests to be able to store/access data-* attributes. Without it, I'm stuck with rather ugly hacks, like folding data into classes. |
This was fixed for the Tab component in #3766. If there are other components where you need this feature, please list those out here. |
I believe the Select<> component needs it as well. |
I'd be open to a PR for this feature in Can you show me an example of what you're doing in your test code? I'm potentially concerned that simply creating an easy selector for the wrapper element of a Select will not be sufficient for tests, and that you may end up reaching into the internals of the component, at which point you might as well use the exported class names: import { Classes } from "@blueprintjs/select"; |
@adidahiya Please make it possible for |
@adidahiya I agree with @petejkim . Could it possible to send in a |
Btw we fixed this for Spinner in #5321 |
Please make it possible for |
It would be nice to include it for |
I'm open to PRs which add support for arbitrary HTML attributes forwarded to the root element for these components. You would just have to extend |
Feature request
Currently not all blueprint components propagate their data attributes to the rendered element and it would be great if they would, but for now we'd like to request data-* attributes on the Tab component.
We will can make more feature requests on other elements as we discover which ones are important. 😄
The text was updated successfully, but these errors were encountered: