Skip to content

Commit

Permalink
fix: input target (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao authored Jul 6, 2021
1 parent 5da9419 commit de318d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Submission/SubmitForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class SubmitForm extends Component {
};

onChange = (event) => {
const { target } = event;
this.setState((prevState) => {
const { target } = event;
const value = target.type === 'checkbox' ? target.checked : target.value;
const { name } = target;
return {
Expand All @@ -54,8 +54,8 @@ class SubmitForm extends Component {
};

onChangeAnyOf = (name, event, properties) => {
const { target } = event;
this.setState((prevState) => {
const { target } = event;
const value = target.type === 'checkbox' ? target.checked : target.value;
// get real subname because we have to change the name of each text input so they are unique
const subname = target.name.replace(`${name}_`, '');
Expand Down

0 comments on commit de318d6

Please sign in to comment.