ElemeFE / ElemeFE/element-react
OnSelect in Menu will repeat twice if we click Menu.Item
Open
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
### Description
if (props.defaultActive != this.props.defaultActive || props.defaultActive != this.state.activeIndex) {
this.defaultActiveChanged(props.defaultActive);
}
(source in componentWillReceiveProps)
The second conditions are clearly passed, but we needn't change the defaultActive. And then ,OnSelect in Menu will repeatly twice if we click Menu.Item. it takes some propblem , for example, when we click a item , the state clicking will miss and it will back the defaultActive-Index item
Contributor guide
Assessment
This issue has not been assessed yet.