Premium support for our pure JavaScript UI components


Post by vbureanu »

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


Post by mats »

We need a test case to inspect. Can you please upload one so we can try it out?


Post by vbureanu »

Hello Mats, I have sent you a private message with link to the dist.


Post by saki »

It is caused by line #77 of src/app/risorse-page/risorse-page.component.ts. That causes the infinite loop.


Post by vbureanu »

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

F5 issue.png
F5 issue.png (398.52 KiB) Viewed 599 times

Post by saki »

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.


Post Reply