Our pure JavaScript Scheduler component


Post by rytis.i »

I've enabled event store pagination using pageStartParamName: 'page' and set the EventStore.pageSize to 2. I have a total of 5 events. When eventStore.load() is called, the store makes only 1 request to the backend to get the first page but doesn't load the other pages. As a bonus confusion EventStore.isPaged returns string 'page' or rather the value of pageStartParamName, even though according to https://www.bryntum.com/products/scheduler/docs/api/Scheduler/data/EventStore#property-isPaged it should be a boolean.

Attachments
package.zip
(28.2 KiB) Downloaded 13 times
pagination_bug_2.gif
pagination_bug_2.gif (870.65 KiB) Viewed 262 times

Post by tasnim »

Hi,

It's because you're requesting for the first page only. We have a pagination demo available in grid, the process is similar you can it here https://bryntum.com/products/grid/examples/paged/

And yes the store.isPaged needs to be boolean. Opened a ticket to fix it here https://github.com/bryntum/support/issues/8912

Best of luck :),
Tasnim


Post by rytis.i »

Looking at the example now I understand this is not the kind of pagination I need. I guess this makes for Grid but not so much for Scheduler. What I was trying to achieve is the following: instead of loading all events at once, which might take some time, I want to load events that are immediately visible to the user and then load the future events after that. This way I can improve perceived responsiveness.

Also is there a way to reload only specific events from backend? Let's say I'm getting a notification from the backend using signal R that events 5, 7 and 12 have changed, is there an easy way to tell the store to reload those events?


Post by marcio »

Hey rytis.i,

For the first part of your question, perhaps you could use https://www.bryntum.com/products/scheduler/docs/api/Scheduler/data/EventStore#function-nextPage and trigger that when scrolling the Scheduler?

About the second part, you could retrieve the data from the API and then use https://www.bryntum.com/products/scheduler/docs/api/Core/data/mixin/StoreSync#function-syncDataset to update only the events that are changed.

Best regards,
Márcio


Post by rytis.i »

Hi Marcio,

I think lazy loading from 6.0 alpha fits my needs better (https://bryntum.com/products/scheduler-next/docs/guide/Scheduler/whats-new/6.0.0#lazy-data-loading-infinite-scroll). Is there a way to refresh a chunk that has been loaded? That would be perfect.


Post by marcio »

Hey rytis.i,

So, for lazy loading, we have a paragraph that explains how you can set up a specific part to be loaded

The backend will receive a request with startIndex and count params that refers to which resources to load. The params will also include a startDate and an endDate that refers to which events (or other type of data) to load (for the resource range). Implement these params in your data queries to only return this range of records.

And about params configuration, please check the following section https://bryntum.com/products/scheduler-next/docs/api/Scheduler/data/CrudManager#ajax-request-configuration

Best regards,
Márcio


Post by joakim.l »

I've created a feature request ticket to add functionality to remove certain lazy loding cache https://github.com/bryntum/support/issues/8961

Regards
Joakim


Post by rytis.i »

@joakim.l thank you!


Post Reply