UNPKG

@progress/kendo-react-scheduler

Version:

React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package

29 lines (28 loc) 1.03 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as t from "react"; import { COLLECTION_ACTION as u } from "@progress/kendo-react-common"; import { useSchedulerViewSlotsContext as m } from "../context/SchedulerViewContext.mjs"; const i = (r, s) => { const { _ref: l } = r, e = t.useRef(null), n = t.useRef(null), [, o] = m(); return t.useImperativeHandle(e, () => ({ element: n.current, props: r })), t.useImperativeHandle(s, () => e.current), t.useImperativeHandle(l, () => e.current), t.useLayoutEffect(() => (o({ type: u.add, item: e }), () => { o({ type: u.remove, item: e }); })), { slot: e, element: n }; }; export { i as useSchedulerSlot };