Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite scroll onTrigger get stuck #173

Open
ronnetzer opened this issue Mar 29, 2021 · 4 comments
Open

Infinite scroll onTrigger get stuck #173

ronnetzer opened this issue Mar 29, 2021 · 4 comments
Assignees
Labels
High Priority The next backlog item to address

Comments

@ronnetzer
Copy link
Contributor

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?

  • Take the infinite scroll example, add a search input that will do datasource.setFilter (make sure to register for filter custom trigger)
  • Write a single character
  • While the request is loading, write another character.

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

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

@shlomiassaf
Copy link
Owner

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

This and sticky rows/columns are urgent

@shlomiassaf
Copy link
Owner

@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

@shlomiassaf shlomiassaf pinned this issue Mar 29, 2021
@shlomiassaf shlomiassaf added the High Priority The next backlog item to address label Mar 29, 2021
@shlomiassaf shlomiassaf added this to the 3.0.2 milestone Mar 29, 2021
@ronnetzer
Copy link
Contributor Author

@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
Copy link
Owner

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

@shlomiassaf shlomiassaf removed this from the 3.0.2 milestone Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority The next backlog item to address
Projects
None yet
Development

No branches or pull requests

2 participants