Skip to content
Snippets Groups Projects
Commit 43b8df32 authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Update state when opened dropdown is unmounted (fixes #8397) (#8398)

parent 5b5ae018
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,12 @@ export default class Dropdown extends React.PureComponent {
return this.target;
}
componentWillUnmount = () => {
if (this.state.id === this.props.openDropdownId) {
this.handleClose();
}
}
render () {
const { icon, items, size, title, disabled, dropdownPlacement, openDropdownId } = this.props;
const open = this.state.id === openDropdownId;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment