From 969042a015f85208c7de9e6ae99ef22a33c0f3f2 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 21 Jul 2018 23:29:17 +0200 Subject: [PATCH] [Select] Simpler onChange event.target logic (#12231) --- packages/material-ui/src/Select/SelectInput.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/material-ui/src/Select/SelectInput.js b/packages/material-ui/src/Select/SelectInput.js index 8133f56de9b100..8f2f731256f55a 100644 --- a/packages/material-ui/src/Select/SelectInput.js +++ b/packages/material-ui/src/Select/SelectInput.js @@ -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] : []; @@ -99,8 +94,7 @@ class SelectInput extends React.Component { } event.persist(); - event.target = { ...target, value, name }; - + event.target = { value, name }; onChange(event, child); } };