mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-28 02:20: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);
|
||||
};
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.active) {
|
||||
componentDidMount() {
|
||||
if (this.props.active) {
|
||||
this.attachListeners();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if (this.props.active) {
|
||||
this.attachListeners();
|
||||
} else {
|
||||
this.removeListeners();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user