@material-ui/popper.js
Version:
A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.
19 lines (17 loc) • 444 B
JavaScript
import setupEventListeners from '../utils/setupEventListeners';
/**
* It will add resize/scroll events and start recalculating
* position of the popper element when they are triggered.
* @method
* @memberof Popper
*/
export default function enableEventListeners() {
if (!this.state.eventsEnabled) {
this.state = setupEventListeners(
this.reference,
this.options,
this.state,
this.scheduleUpdate
);
}
}