Replace unsafe willReceiveProps in emoji_picker_dropdown

This commit is contained in:
diondiondion 2025-11-20 16:16:42 +01:00
parent 28a9492e53
commit f931383c0e

View File

@ -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();