parent
5cb55f486b
commit
b064ddccc5
|
@ -226,6 +226,12 @@ export default class Dropdown extends React.PureComponent {
|
||||||
return this.target;
|
return this.target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount = () => {
|
||||||
|
if (this.state.id === this.props.openDropdownId) {
|
||||||
|
this.handleClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { icon, items, size, title, disabled, dropdownPlacement, openDropdownId } = this.props;
|
const { icon, items, size, title, disabled, dropdownPlacement, openDropdownId } = this.props;
|
||||||
const open = this.state.id === openDropdownId;
|
const open = this.state.id === openDropdownId;
|
||||||
|
|
Loading…
Reference in New Issue