Add ability to deselect a function
was previously impossible to do through the UIpull/1622/head
parent
2e80f6d350
commit
d2000224f8
|
@ -38,8 +38,13 @@ class FunctionSelector extends Component {
|
|||
}
|
||||
|
||||
onSingleSelect(item) {
|
||||
this.props.onApply([item])
|
||||
this.setState({localSelectedItems: [item]})
|
||||
if (item === this.state.localSelectedItems[0]) {
|
||||
this.props.onApply([])
|
||||
this.setState({localSelectedItems: []})
|
||||
} else {
|
||||
this.props.onApply([item])
|
||||
this.setState({localSelectedItems: [item]})
|
||||
}
|
||||
}
|
||||
|
||||
isSelected(item) {
|
||||
|
|
Loading…
Reference in New Issue