search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

onScroll gets fired multiple times, if height if height of .fs_scrollable is changing on dynamicLoading

Asked by Alex
1 year ago.


I am using DayPilot Pro for JavaScript 2022.2.5271 (trial).
There seems to be a problem, if the dynamic content that gets loaded on scroll is changing the height of the Calendar.

If I scroll all the way left, until the ajax request won't find any results, the height of the calendar gets smaller which triggers the scroll event again.

The same happens initially, if the size of the calendar is changed via scroll event.

It works with the workaround:
this.scheduler.nav.scroll.addEventListener('scroll', (e) => {

Answer posted by Dan Letecky [DayPilot]
1 year ago.

At this moment, the Scheduler doesn't debounce onScroll calls that are invoked as a result of the viewport size change. However, this will only happen if you use dynamic height (such as heightSpec: "Auto"). You can also check the actual viewport boundaries (args.viewport) in onScroll and skip the update if the viewport is the same.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.