Search code examples
reactjsschedulesyncfusion

After an external drag, resourceHeader become empty


We need to drop an external item and then update the schedule data accordingly to that change by calling setState but resourceHeader become empty as their templates don't render as a consequence I've reproduced the bug in this stackblitz : https://stackblitz.com/edit/react-gzetyr and here also a recorded screenshot demo showing it: https://i.imgur.com/wjT9APb.gifv PS: i had to call forceUpdate inside a setTimeout after the setState call because strangly setState call alone wasn't enough to re-render the schedule. Best Regards


Solution

  • We have validated the reported problem at our end and we suggest you to use the delayUpdate property to overcome the problem.

    <ScheduleComponent ref={schedule => this.scheduleObj = schedule}  delayUpdate={true} > </ScheduleComponent>
    
    
    
    <TreeViewComponent ref={tree => this.treeObj = tree} delayUpdate={true} </ TreeViewComponent>
    

    Sample: https://stackblitz.com/edit/react-scheduler-i268259-external-drag-and-drop-utku7n?file=index.js

    Kindly try the above sample and get in touch with us If you would need any further assistance.

    UG link(delayUpdate): https://ej2.syncfusion.com/react/documentation/common/how-to/resolve-react-template-issues/