Skip to content
This repository was archived by the owner on Mar 17, 2019. It is now read-only.

Commit c971f87

Browse files
committed
Ignore outside clicks if not expanded.
1 parent 5f45237 commit c971f87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/ExpandablePanel/ExpandablePanel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class ExpandablePanel extends Component {
2626
}
2727

2828
handleClickOutside (evt) {
29-
this.setState({expanded: false})
29+
if (this.state.expanded) {
30+
this.setState({expanded: false})
31+
}
3032
}
3133

3234
render () {

0 commit comments

Comments
 (0)