-
Notifications
You must be signed in to change notification settings - Fork 232
Checkbox: allow props to be passed via props #438
Comments
Oh nice! I like that. Would you do same for the Switch component as well? |
Yes, especially for consistency that makes sense. I'll open one for that component |
Need to keep in mind this bug when fixing this issue. |
From what I'm reading on that bug, it would seem like the ref issue would be fixed with this wouldn't it? The whole point of it is to give the developer more control over the props passed to the input element, so I would think this should come from free with this implementation. |
This component actually needs a handle on the ref. So it actually won't be fixed for free. But #308 is something we should have available in some way shape or form to give the developer more control. We may need to proxy the ref to the developer. Currently in text field we have a solution: |
Uh oh!
There was an error while loading. Please reload this page.
Nov 13 in Discord user reports issues of being able to pass props to field. He created a codepen. JS on the right is the JSX markup. The HTML on the left is what was output by the rendering engine.
https://codepen.io/jbsmith969/pen/zMNVEL
What would be better is rendering the component through composition. Instead of doing:
we should instead do:
The text was updated successfully, but these errors were encountered: