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

Compare types and relevant attributes of <input> and related components. #8

Open
6 tasks
davidmason opened this issue Oct 6, 2015 · 1 comment
Open
6 tasks
Assignees

Comments

@davidmason
Copy link
Owner

Each of these comparisons should be made if the attribute is present in either actual or expected

  • on <input> compare value and defaultValue
  • on <input> compare attribute type
  • on <input type="checkbox"> and <input type="radio">, compare checked and defaultChecked
  • on <option>, compare selected and value
  • on <select>, compare value, defaultValue and multiple

Seems not possible with current shallowRender/react-unit:

  • on <textarea>, compare value and defaultValue

More may be apparent in https://facebook.github.io/react/docs/forms.html

@davidmason davidmason self-assigned this Oct 6, 2015
@davidmason
Copy link
Owner Author

react-unit or the shallow render react addon have some unexpected behaviour with value and defaultValue:

  • in <textarea>, both are just treated as text.
  • in <input>, both are treated as value

This makes proper comparison difficult. value and defaultValue are very different regarding how the component is used so this is something that will need fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant