Skip to content

docs(infinite-scroll): clarify virtual scroll element #3338

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

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/api/infinite-scroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import CustomContent from '@site/static/usage/v7/infinite-scroll/custom-infinite

## Usage with Virtual Scroll

Infinite scroll requires a scroll container to function. When using a virtual scrolling solution, you will need to disable scrolling on the `ion-content` and indicate which element container is responsible for the scroll container with the `.ion-content-scroll-host` class target.
Infinite scroll requires a scroll container. When using a virtual scrolling solution, you will need to disable scrolling on the `ion-content` and indicate which element container is responsible for the scroll container with the `.ion-content-scroll-host` class target.

```html
<ion-content scroll-y="false">
Expand All @@ -56,6 +56,12 @@ Infinite scroll requires a scroll container to function. When using a virtual sc
</ion-content>
```

:::note

`virtual-scroll-element` refers to the scroll container responsible for scrolling the content. This may be a component provided directly by the virtual scroll solution you are using.

:::

## Accessibility

Developers should assign the `role="feed"` attribute to the scrollable list of items that are added to or removed from as the user scrolls.
Expand Down