shlomiassaf / ngrid

A angular grid for the enterprise
https://shlomiassaf.github.io/ngrid
MIT License
241 stars 40 forks source link

Infinite scroll onTrigger get stuck #173

Open ronnetzer opened 3 years ago

ronnetzer commented 3 years ago

What is the expected behavior?

For regular DataSource, when the table is triggered and there's already a processing trigger, the previous trigger will be canceled and the new one will be invoked

What is the current behavior?

For InfiniteDataSource, the previous trigger is being canceled but the new one is not being invoked, which virtually causes the table to be stuck in loading mode

What are the steps to reproduce?

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

angular: 10.x ngrid: 2.x (last version before 3)

shlomiassaf commented 3 years ago

I've witnesed this rarely and couldn't reproduced, now I have something solid. Thanks.

This and sticky rows/columns are urgent

shlomiassaf commented 3 years ago

@ronnetzer I've assigned me and you, if you wish to tackle this, if not i'll try to make time this week or next one

ronnetzer commented 3 years ago

@shlomiassaf sure, I'll give it a try. but can you point me to the right place? I wasn't able to debug it all the way. I've reached onTrigger in infinite-scroll-datasource.context and to execute in execution-queue.ts. in execute there's this.checkOverlap. there's an overlap when you invoke setFilter multiple times (the fromRow and toRow are the same, the entire visible rows)

shlomiassaf commented 3 years ago

Ohh, I just noticed it's 2.x

It's something I don't remember really well, I'll have to dive in.

It also has to be pushed to the relevant branch.

I'll try to play with it, if you have a repo with quick reproduction, it will be great!

Thanks