@progress/kendo-react-gantt
Version:
React Gantt enables the display of self-referencing tabular data with many features. KendoReact Gantt package
9 lines (8 loc) • 1.24 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),f=require("../context/GanttViewContext.js"),u=require("./useDictionaryStore.js"),l=require("@progress/kendo-react-common");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=m(i),p=(e,t,n,r)=>{const o=c.useRef(null),[,s]=f.useGanttViewTasksContext();c.useImperativeHandle(o,()=>({element:r.current,dataItem:e})),c.useImperativeHandle(n,()=>o.current),l.useIsomorphicLayoutEffect(()=>{const a=o.current;if(a)return s({type:u.STORE_ACTION.add,itemRef:a,id:t}),()=>{s({type:u.STORE_ACTION.remove,itemRef:a,id:t})}})};exports.useGanttTask=p;