diff options
Diffstat (limited to 'packages/forms/src/select')
-rw-r--r-- | packages/forms/src/select/index.tsx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/forms/src/select/index.tsx b/packages/forms/src/select/index.tsx index 71bce7039..6f153da6f 100644 --- a/packages/forms/src/select/index.tsx +++ b/packages/forms/src/select/index.tsx | |||
@@ -169,9 +169,7 @@ class SelectComponent extends Component<IProps> { | |||
169 | } | 169 | } |
170 | 170 | ||
171 | componentDidUpdate(prevProps: IProps, prevState: IState) { | 171 | componentDidUpdate(prevProps: IProps, prevState: IState) { |
172 | const { | 172 | const { open } = this.state; |
173 | open, | ||
174 | } = this.state; | ||
175 | 173 | ||
176 | if (this.searchInputRef && this.searchInputRef.current) { | 174 | if (this.searchInputRef && this.searchInputRef.current) { |
177 | if (open) { | 175 | if (open) { |
@@ -182,9 +180,7 @@ class SelectComponent extends Component<IProps> { | |||
182 | 180 | ||
183 | componentDidMount() { | 181 | componentDidMount() { |
184 | if (this.inputRef && this.inputRef.current) { | 182 | if (this.inputRef && this.inputRef.current) { |
185 | const { | 183 | const { data } = this.props; |
186 | data, | ||
187 | } = this.props; | ||
188 | 184 | ||
189 | if (data) { | 185 | if (data) { |
190 | Object.keys(data).map(key => this.inputRef.current!.dataset[key] = data[key]); | 186 | Object.keys(data).map(key => this.inputRef.current!.dataset[key] = data[key]); |
@@ -195,9 +191,7 @@ class SelectComponent extends Component<IProps> { | |||
195 | } | 191 | } |
196 | 192 | ||
197 | componentWillMount() { | 193 | componentWillMount() { |
198 | const { | 194 | const { value } = this.props; |
199 | value, | ||
200 | } = this.props; | ||
201 | 195 | ||
202 | if (this.componentRef && this.componentRef.current) { | 196 | if (this.componentRef && this.componentRef.current) { |
203 | this.componentRef.current.removeEventListener('keydown', this.keyListener); | 197 | this.componentRef.current.removeEventListener('keydown', this.keyListener); |