ElemeFE / ElemeFE/element-react
Options.jsx does not updated with a new value of "selected" - Missing componentWillReceiveProps
Open
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
# Reproduce :
1. Having:
```js
state ={};
```
2. Changing the state:
```
this.setState({ category: 'yy'})
```
# Expected :
The second option should be selected and its value should be reflected in the parent component (Select) .
# Actual:
No change is detected.
# Solution:
Handle componentWillReceiveProps on Option.jsx
Contributor guide
Assessment
This issue has not been assessed yet.