mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 05:12:18 +00:00
parent
5b5ae01824
commit
43b8df3228
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue