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 to render unhandled props to Radio button input #1968

Open
hchokshi opened this issue Jul 16, 2019 · 3 comments

Comments

@hchokshi
Copy link
Member

commented Jul 16, 2019

What feature are you requesting?
Trying to render some supplementary data- attributes to a <Radio /> component. The unhandled props are rendered to the wrapper div (as expected, since unhandled props are rendered to the outermost element of the component). There is no way to render props onto the radio input itself.

It would be useful to be able to render attributes to the input element.

What would be the benefit of adding this feature?
Render supplementary data attributes to the input element. Our requirements have input changes globally tracked, the inputs are identified uniquely by data attributes.

What solution would be ideal for you?
Maybe an extra prop to pass attributes to radio input? I.e. something like <Radio inputUnhandledProps={{ "data-my-input-data": "some value" }} />

@triage-new-issues triage-new-issues bot added the triage label Jul 16, 2019

@nicholasrice

This comment has been minimized.

Copy link
Member

commented Jul 16, 2019

Related to #1968

We've been discussing a way to inject unhandled props to sub elements as you're suggesting, likely aligning to elements exposed in class-name-contracts

@hchokshi

This comment has been minimized.

Copy link
Member Author

commented Jul 16, 2019

@nicholasrice good to hear! :)

Related to #1968

Just a note that the related issue you mentioned is this one.

@nicholasrice

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

hah good catch - related to #1834 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.