mirror of
https://github.com/wassname/talk.git
synced 2026-10-01 12:42:56 +08:00
ClickOutside should only toggle action when open
This commit is contained in:
1 parent
4cfdb6574b
commit
2b2e2f9b5f
3 files changed
+11
-5
No files matched your search
@@ -19,7 +19,9 @@ export default class Toggleable extends React.Component {
|
||||
}
|
||||
|
||||
close = () => {
|
||||
this.setState({isOpen: false});
|
||||
if (this.state.isOpen) {
|
||||
this.setState({isOpen: false});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in new issue
Block a user