> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/activate-infinite-scrolling.md).

# Activate infinite scrolling

Load the rows of a screen flow Data Table in batches as the user scrolls, by giving the table a fixed height and leaving pagination off.

A sales manager scrolls through several hundred open deals in a screen flow. Loading them all at once makes the screen slow, and page buttons break the flow of reading. With infinite scrolling, the Data Table shows a first batch of rows inside a scrollable area and loads the next batch when the user reaches the bottom.

There is no switch named "infinite scrolling". The table scrolls infinitely as soon as two conditions hold: it has a fixed height, and **Show Pagination** is off.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FrYzoozj3uvCejLlSIbPN%2Fdata-table-tutorial-activate-infinite-scrolling-result.png?alt=media" alt="A Data Table with a fixed height, scrolled past its first batch of 25 rows to the rows loaded after it"><figcaption><p>A fixed height turns the table into a scrolling area that loads the next rows on demand.</p></figcaption></figure>

## Before you start

* A screen flow with the Avonni Data Table on a screen and a data source that returns more rows than one batch. See [Learn the Basics](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/learn-the-basics.md).

## Steps

{% stepper %}
{% step %}

### Leave pagination off

1. Select the Data Table and click **Open Component Builder**.
2. In the **Properties** tab, open the **Pagination** section and check that **Show Pagination** is off (its default).
   {% endstep %}

{% step %}

### Choose the batch size

In the same **Pagination** section, set **Number of Items per Page**. Without pagination, it is the number of rows loaded at a time (default `100`). For a quick first screen, `25` or `50` works well.
{% endstep %}

{% step %}

### Give the table a fixed height

Pick one of the two ways:

| Option          | Where                                                                     | Result                                                                                             |
| --------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **Full height** | The **Full height** button (expand icon) in the Component Builder toolbar | The table stretches from its position down to the bottom of the browser window and scrolls inside. |
| **Height**      | **Style** tab, **Size** section, for example `500px`                      | The table is exactly that tall and scrolls inside.                                                 |

Use **Height**, not **Max height** or **Min Height**: only a fixed **Height** turns on infinite scrolling.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fdct6fSXhzNYfT37UTzGr%2Fdata-table-tutorial-activate-infinite-scrolling-height.png?alt=media" alt="The Style tab of the Data Table Component Builder with Height set to 400 px in the Size section" width="320"><figcaption><p>Set Height in Style, Size, or use the Full height button.</p></figcaption></figure>
{% endstep %}

{% step %}

### Save and test

Click **Done**, save the flow and run it with **Debug**. The Component Builder preview does not scroll infinitely, so test in the running flow.

The table shows the first batch inside a scrollable area. When you scroll to the last row, the next batch loads under it, until every row is shown.
{% endstep %}
{% endstepper %}

## What happens without a fixed height

| Height                                | Show Pagination | What the user gets                                               |
| ------------------------------------- | --------------- | ---------------------------------------------------------------- |
| Fixed (**Full height** or **Height**) | Off             | Infinite scrolling                                               |
| None                                  | Off             | A **Show More** button under the table that loads the next batch |
| Any                                   | On              | Page buttons, one batch per page                                 |

{% hint style="info" %}
With a **Variable** data source, the Get Records element has already retrieved every record before the screen opens. The table only draws them in batches.
{% endhint %}

## Troubleshooting

<details>

<summary>The table shows a Show More button instead of scrolling</summary>

The table has no fixed height. Set **Height** in **Style** > **Size**, or click **Full height** in the toolbar. A **Max height** alone does not count.

</details>

<details>

<summary>Scrolling stops before the last record</summary>

With a **Query** data source, **Maximum Number of Records** caps the total. Raise it if users need to reach more rows.

</details>

## Related tutorials

* [Group rows and show totals](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/group-rows-and-show-totals.md): fewer rows to scroll when deals are grouped by stage.
* [Data Table reference](https://docs.avonnicomponents.com/flow/flow-components/data-table.md): pagination and Style settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/data-table/tips-and-tricks/activate-infinite-scrolling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
