Our pure JavaScript Scheduler component


Post by eccdakaj »

In Extjs version there is a method "getSchedulingView().repaintAllEvents()" for this.
In plain Javascript version?

Post by pmiklashevich »

You can try to call scheduler.refreshRows() but why do you need this? What's the use case? UI should get updated automatically according to the changes in your data layer.

Pavlo Miklashevych
Sr. Frontend Developer


Post by eccdakaj »

In the event I have to show a calculated value, which depends on the data in the event, but it also depends on a parameter that the user can modify.
If the user changes the parameter, I should show the "new" calculated value; since the underlying data does not change, the scheduler correctly does not perform any refresh.
The calculation is done within the "EventRenderer" event.
I could overwrite the "name" field of the event, and delegate the refresh to the scheduler, but I wouldn't want to change the data just for this purpose

Post by pmiklashevich »

It soulds like you need to provide a new field for the calculated value. Then when this field gets changed, events are redrawn automatically. So when the parameter is modified by a user, you recalculate the value and set to the field.

Pavlo Miklashevych
Sr. Frontend Developer


Post by eccdakaj »

Good solution. I'll do it this way. Thank you.

Post Reply