Skip to content

Commit

Permalink
[Select] Simpler onChange event.target logic
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jul 21, 2018
1 parent d077c6e commit 31ffa2d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/material-ui/src/Select/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ class SelectInput extends React.Component {

if (onChange) {
let value;
let target;

if (event.target) {
target = event.target;
}

if (this.props.multiple) {
value = Array.isArray(this.props.value) ? [...this.props.value] : [];
Expand All @@ -98,9 +93,7 @@ class SelectInput extends React.Component {
value = child.props.value;
}

event.persist();
event.target = { ...target, value, name };

event.target = { value, name };
onChange(event, child);
}
};
Expand Down

0 comments on commit 31ffa2d

Please sign in to comment.