-
Notifications
You must be signed in to change notification settings - Fork 25
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
inputs: React doesn't like camelCase props on dom elements #709
Comments
Lol. Such little faith with that last paragraph. |
lol was trying to avoid over-committing you. i have full confidence 😄 |
…o Input.js from parent components.
#716 uses custom prop types to filter out from spread, this case we don't hacky eslint and let render method more clear and focused, but still, duplicate with propTypes (needed for styleguide). hopefully we could use spread in propTypes like
but which is not supported in styleguide yet. any idea could be better? |
Checkbox, Dropdown, Radio, Switch also need to be handled |
Closed by PR #716 |
We recently updated input components to pass down all props so we could use things like autoFocus, but now we are getting JS warnings in console because "React does not recognize the
isValid
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercaseisvalid
instead. If you accidentally passed it from a parent component, remove it from the DOM element."Basically this happens for any camelcase prop, including the ones used by Atlas like isValid, errorText, and iconTooltip.
We do still want it to pass down anything that a dom element could use, like autoFocus or data attributes.
Derek thinks he's got a solution.
The text was updated successfully, but these errors were encountered: