Do not activate the already active list item

This commit is contained in:
Paul Kaplan committed 2018-05-23 10:08:55 -04:00
1 parent 1377e7b84c
commit 9b6cd4fc63
1 file changed
+5
+5
View File
@@ -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]