mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-28 18:40:47 +00:00
Replace unsafe willReceiveProps in emoji_picker_dropdown
This commit is contained in:
parent
28a9492e53
commit
f931383c0e
|
|
@ -61,8 +61,14 @@ class ModifierPickerMenu extends PureComponent {
|
||||||
this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);
|
this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
componentDidMount() {
|
||||||
if (nextProps.active) {
|
if (this.props.active) {
|
||||||
|
this.attachListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidUpdate() {
|
||||||
|
if (this.props.active) {
|
||||||
this.attachListeners();
|
this.attachListeners();
|
||||||
} else {
|
} else {
|
||||||
this.removeListeners();
|
this.removeListeners();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user