We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

resourceHeaderTemplate get re-render on state change

Thread ID:





143432 Mar 20,2019 07:59 AM UTC Mar 28,2019 04:56 PM UTC React - EJ 2 6
Tags: Schedule
Sonam Diwate
Asked On March 20, 2019 07:59 AM UTC

resourceHeaderTemplate get re-render on state change. Because of this every time it blinks and shows the data.
How to avoid rerending custom template.

Sonam Diwate

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 21, 2019 08:55 AM UTC

Hi Sonam, 
Thank you for contacting Syncfusion support. 
In the below sample we have changed the state value on button click which will load the events in empty resource Scheduler without any blink. 
If we misunderstood your requirement, kindly share your code example / sample(if possible) to proceed further and check whether your requirement is like below forum. 

Sonam Diwate
Replied On March 23, 2019 05:13 AM UTC

This is working as expected because this example contents static dataSource or static data from json.
Could you please provide same example with data from server.

As we have a structure which calls a action from reducer and update state using getDerivedStateFromProps .

Sonam Diwate

Sonam Diwate
Replied On March 27, 2019 07:14 AM UTC

Can anyone please help me on this issue?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 27, 2019 10:48 AM UTC

Hi Sonam, 
Thanks for your update. 
We have modified our previous sample to fetch the data from remote service and Schedule is working correctly. We request you to reproduce the issue in our sample and revert else share your code example / sample (if possible) to proceed further. 

Sonam Diwate
Replied On March 27, 2019 10:57 AM UTC

I have created POC which has external drag and drop example.
and i have added simple state change event, but when we change the state "resourceHeaderTemplate" function get re render again and template data will not shown on the screen.

Could you help me to fix this issue and guide me what wrong I am doing.
Please click on change source button at top left of page to reproduce this issue.

Attachment: schedulingDragDrop_39efa436.zip

Hareesh Balasubramanian [Syncfusion]
Replied On March 28, 2019 04:56 PM UTC

Hi Sonam, 

We have checked your provided code example and could reproduce the reported problem at our end, which was suspected to be due to the “resourceHeaderTemplate” property is not properly handled during the set state changes. Currently, we are validating the scenario further related to this particular template property and therefore, in the mean-time, we suggest you to try our following highlighted code changes (by declaring a variable/property for the selectedDate and group properties and assign those variables to the respective APIs of the ScheduleComponent instead of directly assigning the value) which could also be referred from the below StackBlitz sample.  Also, further information regarding this issue validation will be shared from our side on March 29, 2019. 

Existing Code 
Suggested Workaround 


<ScheduleComponent ref={schedule => this.scheduleObj = schedule} cssClass='schedule-drag-drop' width='100%' height='650px' selectedDate={new Date(2018, 7, 1)} currentView='TimelineDay' resourceHeaderTemplate={this.resourceHeaderTemplate} 

<ScheduleComponent ref={schedule => this.scheduleObj = schedule} cssClass='schedule-drag-drop' width='100%' height='650px' selectedDate={this.date} currentView='TimelineDay' 


group={{ resources: ['Departments', 'Consultants'] }} 


Kindly be patience, until we get back to you with the issue validation information.  

Hareesh B 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon