From 03be623a1679b37ef73fa6e87e58f8a5bd68bc66 Mon Sep 17 00:00:00 2001 From: tengge1 <930372551@qq.com> Date: Sat, 19 Oct 2019 22:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowEditor.Web/src/ui/form/Select.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ShadowEditor.Web/src/ui/form/Select.jsx b/ShadowEditor.Web/src/ui/form/Select.jsx index 5d5a6d59..bcd3733d 100644 --- a/ShadowEditor.Web/src/ui/form/Select.jsx +++ b/ShadowEditor.Web/src/ui/form/Select.jsx @@ -10,7 +10,7 @@ class Select extends React.Component { constructor(props) { super(props); - this.handleChange = this.handleChange.bind(this, props.onChange); + this.handleChange = this.handleChange.bind(this); } render() { @@ -28,7 +28,9 @@ class Select extends React.Component { ; } - handleChange(onChange, event) { + handleChange(event) { + const { onChange } = this.props; + const selectedIndex = event.target.selectedIndex; if (selectedIndex === -1) {