@atlaskit/tree
Version:
A React Component for displaying expandable and sortable tree hierarchies
16 lines • 388 B
JavaScript
export default class DelayedFunction {
constructor(delay) {
this.delay = delay;
}
start(fn) {
this.stop();
this.timeoutId = window.setTimeout(fn, this.delay);
}
stop() {
if (this.timeoutId) {
clearTimeout(this.timeoutId);
this.timeoutId = undefined;
}
}
}
//# sourceMappingURL=delayed-function.js.map