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.getEvents could go into infinite loop if recurrence feature is enabled #1396

Closed bmblb closed 4 years ago

bmblb commented 4 years ago

To reproduce on recurrence demo call this in console:

scheduler.eventStore.getEvents({ resourceRecord : scheduler.resourceStore.first })

Pause in a second or two, see browser is constantly generating occurrences.

  1. It is not stated in the docs, that start/end are required with recurrence
  2. leaving option to go infinite loop that easy is no good

Probably if start/end are omitted, recurrence mixin should only generate few occurrences. 1 maybe?

ExtAnimal commented 4 years ago

If dates are omitted and there are recurring events and includeOccurrences is not passed as false, then it's an invalid request. What are you generating occurrences for? It must be for a UI which has a time range.

bmblb commented 4 years ago

If this is invalid request - store has to throw exception. Also docs have to state this limitation clearly. No API call should make page unresponsive.

isglass commented 4 years ago

I vote docs + throw

ExtAnimal commented 4 years ago

https://github.com/bryntum/bryntum-suite/pull/1903