-
Notifications
You must be signed in to change notification settings - Fork 50
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
How do I add data attributes to radio-button ? #98
Comments
We don't currently have a good way to support |
Hello @raycohen 😃 I'll be happy to send a PR for adding this enhancement. I was thinking of adding a new property, say |
I would love to see support for |
What would really be nice is if the components supported attribute forwarding (AKA splattributes, Depending on the Ember version support matrix and the tolerance for either providing or requiring a polyfill, that would allow you to add whatever attribute you want to a |
Hmm know any addons that use this kind of polyfill? I'm running into this and would like to submit a PR.
Never mind — if you're using modern Ember (support splattributes), you can generate a component override for radio-button.js/.hbs. You'll need to copy over the template from the addon and insert the attribute spread in the label: <label
class="ember-radio-button {{if checked checkedClass}} {{joinedClassNames}}"
for={{radioId}}
...attributes
> Nevertheless, we should build out support :) |
Any progress on this? Seems it's not possible to apply a modifier to the radio button |
I want to use data-test-selectors and for that purpose I wanted to add data attributes to my radio button.
I tried adding some data attributes but they did not work.
The text was updated successfully, but these errors were encountered: