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

todo(ion-virtual-scroll): Bugs and feature requests #16632

Closed
6 of 20 tasks
paulstelzer opened this issue Dec 7, 2018 · 22 comments
Closed
6 of 20 tasks

todo(ion-virtual-scroll): Bugs and feature requests #16632

paulstelzer opened this issue Dec 7, 2018 · 22 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@paulstelzer
Copy link
Contributor

paulstelzer commented Dec 7, 2018

Collection of issues which are related to ion-virtual-scroll (if i missed a issue, please let me know) - for @manucorporat and the dev team

Needs investigation:

Bugs (rendering issues):

Feature requests:

@ionitron-bot ionitron-bot bot added the triage label Dec 7, 2018
@paulstelzer paulstelzer added package: core @ionic/core package and removed triage labels Dec 7, 2018
@berchik
Copy link

berchik commented Dec 8, 2018

Thank you @paulstelzer for making this collection. Not being able to use long lists in Ionic is the top limitation preventing me from using the framework. Having reliable professional and well-behaved components would be important for me (and more than few others I believe) over any other nice/exciting developments by the wonderful Ionic team.

@pjc2007
Copy link

pjc2007 commented Jan 2, 2019

@paulstelzer - I have just added the following as feature request (#16930)

@DavidWiesner
Copy link
Contributor

I created a pull request #17345 addressing the issues #15948, #17298 and #14681

@touch2hussain
Copy link

Seriously these issues are major blockers for us to use ionic v4 :(

@ASHFAQPATWARI
Copy link

ion-item-divider sticky attribute does not work with inside virtual scroll

@Mazus
Copy link

Mazus commented Mar 19, 2019

Hey,
I think you can add #17371
By the way, can you tell us if you are currently looking into these issues ?

I actually don't know how to have correct performance without using virtual-scroll, but if I do, then there are several problems with data update not being reflected, and I'm kinda stuck.

Is there any workaround or should I use infinite-scroll ?

Thanks

@JustasKuizinas
Copy link

I think this should be priority number 1, a lot of apps have large lists of data and infinite scroll isn't solution

@brandyscarney brandyscarney added type: bug a confirmed bug report type: feature request a new feature, enhancement, or improvement labels May 10, 2019
@mnaduvadka
Copy link

On Scrolling it loads previously loaded item images from higher in the menu for the new items, then corrects once it loads the correct item image. Here overall user experience is very bad. They see one image when scrolling, and the new image gets loaded after some time. Experience is not smooth, and its confusing

@FernetB
Copy link

FernetB commented Aug 15, 2019

Has anybody found an alternative to virtual scroll?

Because ion-list is not a good choice when i have a +100 items, and virtual scroll has a lot of bugs.

Infinite scroll is not a good idea when i have 3 slides of list, because all of them uses the same event (ionInfinite)

@188599
Copy link

188599 commented Dec 3, 2019

I can verify that issue #15471 is still occurring in the current version.

I have a little repo right here: https://stackblitz.com/edit/ionic-v4-angular-tabs-8xtl6w

It won't always render in the wrong order, but if you refresh a few times it should.

Here is a screenshot of it:

Screenshot_1

Also, it seems the elements are rendered in the opposite order, starting from the last to the first, whenever it does render all of them in the right order.

@dorontal
Copy link
Contributor

dorontal commented Dec 9, 2019

@brandyscarney and @paulstelzer and @manucorporat -- yes, here's a similar but informative open issue (#18409) not on your list. I would like to help close this and similar issues. But since these issues have been around for more than a year, I'd like to start after being briefed on what has been done so far and how to move forward. Is that possible, or do I need to dig around on my own? Please do not hesitate to contact me if you have any leads on how to solve this issue.

@aabi0044
Copy link

version 5.0.0
ion-virtual-scroll doesn't show more than three items and instead of that show white spaces

@Yohandah
Copy link

I've been trying to use ion-virtual-scroll but after many bugs encountered I've decided to use the CDK Virtual Scroll which is more reliable. Especially the update mechanism of CDK Virtual Scroll is more convenient as we can update the full list item this.list = newList and the component manages the update. If we do that with ion-virtual-scroll the list will blink

@lincolnthree
Copy link

@Yohandah Sorry to hear you had the same issues with virtual scroll we have. The ion-virtual-scroll seems incredibly bugged in many (documented and reported) ways. Do you have an example of using CDK Virtual Scroll that effectively replaced ion-virtual-scroll, that you can post here?

I'm interested to see what your CDK VS implementation looks like, to see if we could improve our own solution. Right now we are using an in-house fork of https://github.com/rintoj/ngx-virtual-scroller

@Yohandah
Copy link

Yohandah commented Sep 11, 2020

@lincolnthree Basically I wanted to implement a ion-virtual-scroll with a ion-infinite-scroll, after encountering many bugs as I said I, found this PR (https://github.com/ionic-team/ionic-docs/pull/1406/files) on Ionic's Github that is not merged yet and there's literally a section that tells to use CDK ... so I went for it. It was released with Angular 8 if I recall correctly ..

I started with a basic implementation (https://stackblitz.com/edit/angular-material-cdk-virtual-scrolling?file=src/app/app.component.html) and then added an "infinite behavior" using this tutorial https://fireship.io/lessons/infinite-virtual-scroll-angular-cdk/ using their nextBatch method that triggers a call to my ws to load more data when reaching the end of the list. I didn't use a DataSource or an Observable for the list source, but just an Array.

What I liked about CDK is that you can use Angular ChangeDetection ... which allows for instance to update your data doing this.items = newItems instead of ion-virtual-scroll having to update the actual array's instance and then doing checkRange() (I couldn't because my items were coming from NgRx so ...) because otherwise it would make your list blink when updated (and I needed to add items at the top, and the end of the list, simultaniously)

@Yohandah
Copy link

Yohandah commented Sep 16, 2020

@lincolnthree Looks like you should migrate to CDK VirtualScroller!

2 days ago from Ionic Staff:

With upcoming major versions of Ionic Framework, we are going to be transitioning to using Angular's CDK Scroller.

#22084 (comment)

@lincolnthree
Copy link

@Yohandah Wooo!! Thank you for sharing this concept, and for sharing the team's direction. This is great news. I'm going to be looking at CDK virtual scroller soon, although I think it still does not support a few things that ngx-virtual-scroll does that we need. (Like multiple items per row / multiple columns / line wrapping):

angular/components#10114

@eshell
Copy link

eshell commented Jan 10, 2021

following the infinite scroll example, I cant get past "object is possibly null" referring to ev.target. for some reason if i use "ev.detail.complete()" instead of "ev.target.complete()", it will work once or twice before the ev.target becomes null again.

@timsar2
Copy link

timsar2 commented Feb 9, 2021

Maybe this trick is helpful:
9kqrxcct0oejbakxi5zz

article in dev.to

or

try to resize screen in stackblitz

@wiegell
Copy link

wiegell commented Mar 11, 2021

ion-item-divider sticky attribute does not work with inside virtual scroll

Maybe you can use this example - material cdk though:
https://stackblitz.com/edit/angular-ivy-pxmnpx?file=src/app/app.component.html

@liamdebeasi
Copy link
Contributor

Thanks for the issue! With the release of Ionic 6, we made the decision to deprecate ion-virtual-scroll in favor of 3rd party solutions.

Moving forward, ion-virtual-scroll will only receive critical security fixes, and the component will be removed in Ionic 7. As a result, I am going to close this issue.

We have prepared migration guides for each of the 3 JavaScript frameworks we support, so developers can get started migrating right away.

Migration for Angular
Migration for React
Migration for Vue

Some Ionic components that rely on scrolling inside of ion-content have some limitations when using 3rd party virtual scrollers, but we are actively working on a solution for this. Please follow #23437 for updates. Thanks for your patience as we work to resolve this issue.

We believe this change will lead to a healthier Ionic ecosystem as it frees up resources for the Ionic team to dedicate to other areas of this project while still giving developers options for performant virtual scroll solutions.

Thank you!

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 19, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Feb 19, 2022
@liamdebeasi liamdebeasi removed the type: feature request a new feature, enhancement, or improvement label Dec 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests