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

Fix issue where clicking on span in option would not update value. #13

Merged
merged 1 commit into from
Nov 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion formsy-material-ui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let FormComponentMixin = {
},

handleChange: function (event) {
this.setValue(event.currentTarget.value);
this.setValue(event.target.value);
},

handleValueChange: function (event, value) {
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var FormComponentMixin = {
},

handleChange: function handleChange(event) {
this.setValue(event.currentTarget.value);
this.setValue(event.target.value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing the mixin itself(which would affect the handleChange for all components). Shouldn't we have this code for formsy-select only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see problems with FormsyText (the only other field that uses the method) when I was at 0.2.2. However it looks like you might be splitting out the handleChange functionality with your new PR to fix 0.2.3, so I'm not sure this fix will still apply if/when that happens.

},

handleValueChange: function handleValueChange(event, value) {
Expand Down