bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

EventStore `loadDateRange` event fired excessively #5828

Closed matsbryntse closed 3 months ago

matsbryntse commented 1 year ago

http://lh/bryntum-suite/scheduler/examples/infinite-scroll/ Note behavior on page load

Needs a review

ExtAnimal commented 1 year ago

The event is just an informational event from the EventStore saying it has been asked for a date range of events for some resource. The key here is "For some resource".

Its API docs have always said Fired when a range of events is requested from the {@link #function-getEvents} method.

The event is fired more than once only in Scheduler because Scheduler loops through the rendered resources and for each rendered resource calls

getEvents({
    startdate : ...,
    endDate : ...,
    resourceRecord : resource
});

so you will get one call for each rendered row. The resourceRecord is different each time.

The resulting actual event load will be different each time. If users are actually using this event for something, each event has a real, different meaning because the resource is different.

We should really add the resourceRecord to the event.