ElemeFE / ElemeFE/element-react

Options.jsx does not updated with a new value of "selected" - Missing componentWillReceiveProps

Open
#719 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.