Hello,
We have an Angular page with BryntumSchedulerPro inside.
After the F5 Google Chrome tab no longer responds.
Inside of console we have no any error.
Which cause can be?
Thanks
Hello Saki, we have used the bryntum example from here to write that piece of code:
https://bryntum.com/examples/examples-scheduler/infinite-scroll/
Please see attached image below.
How can we get rid of that issue while preserving your code?
We don`t understand where is the real issue, is it a Bryntum bug or our?
Sincerely,
Vitalie
I haven't analyzed the complete application but what's happening is that while handling change
event above some part of the app (or our component) triggers the change
again, thus infinite loop.
A possible solution would be to set a flag inside the handler indicating that we are inside and we would only scroll if the flag would be reset. Something like:
if(!this.insideChangeHandler) {
this.insideChangeHandler = true;
...scrollTo(...); // the culprit line
this.insideChangeHandler = false;
}
BTW, userAction
variable seems to serve that purpose so you can take a look if it has an expected value.