Open jaballogian opened 2 years ago
scheduleRef is null; you cant set the value in null div. try this one
//const schedulerRef = useRef(); const schedulerRef = useCallback((node) => { if (node !== null) { console.log(node); scheduler.init(node, new Date(2020, 5, 10)); scheduler.clearAll(); scheduler.parse(events);
scheduler.render();
setHoursScaleFormat(timeFormatState);
//setHeight(node.getBoundingClientRect().height);
}
}, []);
Try this one https://codesandbox.io/s/learn-dhx-scheduler-demo-forked-eehe3r?file=/src/components/Scheduler/Scheduler.jsx
Hello,
I'm trying to recreate this https://github.com/DHTMLX/react-scheduler-demo demo using the functional component instead of the class-based component here https://codesandbox.io/s/learn-dhx-scheduler-04r17f.
But there is an error with the
scheduler
below.What's the source of the error and what's the solution to use the DHTMLX Scheduler component with functional component properly?