Angular Schedule component is not refreshing when refreshEvents is called from @Input setter

Hello,
I have problem where I want pass data to the schedule component in a child compoment using @Input setter and then call refreshEvents() method on the schedule component. I have created StackBlitz with this issue. You can see in the console that terms are passed correctly and there isn't any error  in console when calling refreshEvents method, but still - the schedule component remains blank.

StackBlitz is here:


What is the way to pass data for schedule component via Input and then refresh schedule? Thanks.

1 Reply 1 reply marked as answer

BS Balasubramanian Sattanathan Syncfusion Team April 5, 2021 12:40 PM UTC

Hi Michal, 

Greetings from Syncfusion Support. 

We have validated your reported scenario at our end and let you know that you have added the data to the local variable instead of the scheduler dataSource. So that, the appointments are not added when clicking the button. Now we have modified the sample based on that and which can be available from the below link. 


@Input("terms") 
set reservationTemplates(terms: any[]) { 
  if (terms) { 
    console.log("loading data: " + terms.length); 
    terms.forEach(term => console.log("loaded: " + term.Subject + ", starting "+ term.StartTime)); 
    this.scheduleObj.eventSettings.dataSource = terms; 
 

Kindly refer to the above solution and let us know if you need further assistance. 

Regards,
Balasubramanian S 


Marked as answer
Loader.
Up arrow icon