UNPKG

semantic-ui-calendar-react

Version:
16 lines (14 loc) 515 B
/** Set zero timeout. * * Sometimes we need to delay rerendering components * on one tick (if they are inside `Popup` and rerendering could * change `Popup`'s content sizes). * Becouse it races with Popup's onclick handler. * `Popup` relies on it's content sizes when computing * should popup stay open or be closed. So we need * to wait until `Popup`'s onclick handler done its job. */ const tick = (leadToRerendering, ...args) => { setTimeout(leadToRerendering, 0, ...args); }; export default tick;