Our pure JavaScript Scheduler component


Post by peaguilar »

We are using the calendar feature for scheduler pro. calendars are rendering like they should on load, and all is fine there. However, if I open a second tab of our app, and update the calendar for a resource, and then go back to the 1st tab the data is not reflecting in scheduler. The new api data is being fetched, and the calendars state that I pass into Scheduler has the new data, but Scheduler pro will not render the new data. I am assuming there is some type of cache going on, but I cant figure out how to override it.


Post by peaguilar »

If you watch this video all of the way through you will see the count of intervals changes as I console out the calendars, and map the intervals to show the count. However the change in calendar intervals does not reflect on scheduler even though the data has been updated.

Kapture 2023-02-06 at 17.39.27.gif
Kapture 2023-02-06 at 17.39.27.gif (2.57 MiB) Viewed 239 times

Post by alex.l »

The new api data is being fetched

How did it fetch? Did you manually trigger load data?

Make sure you used latest released version.

How to reproduce it? Please try it with our examples and provide steps to reproduce or attach runnable example here.

Here is a guideline how to ask for help: viewtopic.php?f=1&t=772

All the best,
Alex


Post by peaguilar »

We are fetching using react query. Its not a manually load. When you go away from the tab, and come back react query triggers an update of the data. The data is getting to the component where bryntum is rendered, but bryntum is not updating the schedules to reflect the new data. Is there a caching mechanism for calendars, and if so is there a way to force an update?


Post by marcio »

Hey peaguilar,

There is no caching mechanism for calendars, if you're using the inline data approach, you can follow this documentation https://bryntum.com/products/scheduler/docs/api/Scheduler/data/CrudManager#using-inline-data

If not, you'll need to update the event, assignment and so on using this property https://bryntum.com/products/scheduler/docs/api/Scheduler/data/EventStore#property-data

Best regards,
Márcio


Post Reply