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
2 years ago.

Hey,

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:
https://forums.daypilot.org/question/4544/angular-scheduler-horizontal-scroll-position
`
this.scheduler.nav.scroll.addEventListener('scroll', (e) => {
this.debounceScrollEvent();
});
`

Answer posted by Dan Letecky [DayPilot]
2 years 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.