-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
feat(virtual-scroll): usage with custom scroll target #2229
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/ionic/ionic-docs/7M6aXEPUCEyht6FvD4oWTtYACANA |
Co-authored-by: Amanda Smith <[email protected]>
Co-authored-by: Amanda Smith <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to merge once my comment below is addressed.
Hi all. Please see the following pull request in the Angular CDK, as I believe this will make much of this easier if we can get these features merged: angular/components#24394 This PR adds the ability to provide custom virtual scroll extensions to link with scroll containers. Essentially allowing the virtual-scroller to attach to ion-content's 'main' scrolling element directly (though I am attempting to work with the author to get that feature added / supported.) Would love your comments & feedback. |
@lincolnthree that feature change would allow developers to make use of the <ion-content #content>
<cdk-virtual-scroll-viewport [scrollableElement]="content.getScrollElement() | async">
...
</cdk-virtual-scroll-viewport>
</ion-content> I don't see any downsides to that feature change, but we would continue to offer this class approach to support all virtual scrolling solutions in all supported frameworks, not just CDK & Angular. For example, this is how it looks for React, Vue and Angular with the same implementation pattern: https://gist.github.com/sean-perkins/277524ef0e450591907a87acec15af11 Appreciate your feedback and making us aware of that feature/change from Angular! |
with this being merged, i guess this doc is outdated? https://ionicframework.com/docs/react/virtual-scroll#a-note-on-ionic-components :) |
@sean-perkins pls deprecate https://ionicframework.com/docs/react/virtual-scroll#a-note-on-ionic-components as obsolete |
Thanks everyone, I fixed this in #2780. |
Updates the sections for note regarding Ionic components to include the usage instructions for the custom scroll target.