Do not activate the already active list item
This commit is contained in:
1 parent
1377e7b84c
commit
9b6cd4fc63
1 file changed
+5
@@ -31,6 +31,11 @@ class ListMonitor extends React.Component {
|
||||
}
|
||||
|
||||
handleActivate (index) {
|
||||
// Do nothing if activating the currently active item
|
||||
if (this.state.activeIndex === index) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
activeIndex: index,
|
||||
activeValue: this.props.value[index]
|
||||
|
||||
Reference in new issue
Block a user