Version: 5.1.1 (it also happens with 4.4.4)
I’ve Using the Container Autoresize Extension and I tried to add a function to filter events depending on certain conditions. I noticed that the filtering function is called twice for each event on day/week/month and at least three times on agenda view.
Steps to reproduce:
- Use Sample “09_api/09_filtering_events” and just include Autoresize Extension.
- Put a console.log or alert on filtering function.
Unfortunately, we can’t change this behaviour - that is how the Container Autoresize works - it redraws the scheduler again after it calculates its size. The redrawing calls filtering function, that is why it is called the second time.
ok, but the redraw occurs even if I don’t change the window size?
For example in week view I got to next week and the go back to current week and the filter event is called twice for each event…so is redrawing the scheduler although I didn’t change the size of the window?
Yes, the first drawing of the Scheduler - is a regular one, then the Container Autoresize code starts to work and redraw the Scheduler again.