> For the complete documentation index, see [llms.txt](https://docs.fact-finder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./api/navigation/paging-dropdown.md).

# Paging Dropdown

Display search-result pagination in customizable dropdowns.

## Documentation

The `ff-paging-dropdown` acts like the `ff-paging` element, but is displayed as a dropdown.

Use `{{caption}}` to access a paging item's value.

{% hint style="info" %}
Configure the number of available dropdown pages in **FactFinder UI** → **Basic Settings** → **Result listing** → **Paging (Number of Links)**.
{% endhint %}

```html
<ff-paging-dropdown>
    <ff-paging-item>{{caption}}</ff-paging-item>
</ff-paging-dropdown>
```

### `show-selected`

When the attribute `show-selected` is set on the `ff-paging-dropdown`, the dropdown contains the currently selected element.

```html
<ff-paging-dropdown show-selected>
    <ff-paging-item>{{caption}}</ff-paging-item>
</ff-paging-dropdown>
```

### `paging-item`

Unlike `ff-paging`, `ff-paging-dropdown` accepts only one `ff-paging-item`. It is the template for every generated page.

```html
<ff-paging-dropdown show-selected>
    <ff-paging-item>{{caption}}</ff-paging-item>
</ff-paging-dropdown>
```

### Rendered HTML

When set up like in the example above, the rendered HTML could look like this.

```html
<ff-paging-dropdown show-selected="" tabindex="999" class="">
    <ff-paging-item class="ffw-selected" type="pageLink">
        <div class="ffw-page-item-container ffw-cursor">1</div>
    </ff-paging-item>
    <div class="ffw-paging-dropdown-container ffw-paging-dropdown-closed">
        <ff-paging-item class="ffw-selected" type="pageLink">
            <div class="ffw-page-item-container ffw-cursor">1</div>
        </ff-paging-item>
        <ff-paging-item class="" type="pageLink">
            <div class="ffw-page-item-container ffw-cursor">2</div>
        </ff-paging-item>
        <ff-paging-item class="" type="pageLink">
            <div class="ffw-page-item-container ffw-cursor">3</div>
        </ff-paging-item>
    </div>
</ff-paging-dropdown>
```

### ff-paging-select

If you wish to use a native HTML `select` to render paging dropdown, you can use `ff-paging-select` element.

It works without custom templates. You can also define your own `select` or `option`.

The most basic setup:

```html
<ff-paging-select></ff-paging-select>
```

Will act like:

```html
<ff-paging-select>
    <select>
        <option>{{caption}}</option>
    </select>
</ff-paging-select>
```

## Demo

Try the [Paging Dropdown demo](https://search-web-components.fact-finder.de/demos/4.x/ff-paging-dropdown).

## API code

### `ff-paging-dropdown`

**Properties**

<details>

<summary>Properties</summary>

| Name                                  | Description                                                            |
| ------------------------------------- | ---------------------------------------------------------------------- |
| **items** (Object) (default: empty)   | The paging data from FactFinder. Set it through JavaScript only.       |
| **show-selected** (Boolean)           | Shows the currently selected paging element in the dropdown container. |
| **collapse-onblur** (Boolean)         | Automatically closes the element when it loses focus.                  |
| **opened** (Boolean) (default: false) | Indicates whether the element is opened by default.                    |

</details>

**Methods**

<details>

<summary>Methods</summary>

| Name                           | Description                                             |
| ------------------------------ | ------------------------------------------------------- |
| **show()**                     | Opens the dropdown element.                             |
| **hide()**                     | Closes the dropdown element.                            |
| **toggle(collapse?: Boolean)** | Opens or closes the element based on its current state. |

</details>

**Events**

<details>

<summary>Events</summary>

| Name            | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| **dom-updated** | Triggered when the element receives new data and templates render. |

</details>

### `ff-paging-select`

**Properties**

<details>

<summary>Properties</summary>

| Name                                         | Description                                                      |
| -------------------------------------------- | ---------------------------------------------------------------- |
| **pagingData** (Object) (default: undefined) | The paging data from FactFinder. Set it through JavaScript only. |

</details>

**Events**

<details>

<summary>Events</summary>

| Name            | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| **dom-updated** | Triggered when the element receives new data and templates render. |

</details>

You may customize only the `select` element:

```html
<ff-paging-select>
    <select class="user-class"></select>
</ff-paging-select>
```

Or just the `option`:

```html
<ff-paging-select>
    <option>Page {{caption}}</option>
</ff-paging-select>
```

Or both of them:

```html
<ff-paging-select>
    <select class="user-class">
        <option>Page {{caption}}</option>
    </select>
</ff-paging-select>
```

### Rendered HTML

Assuming FactFinder displays five links, the last example produces:

```html
<ff-paging-select>
    <select class="user-class">
        <option>Page 1</option>
        <option>Page 2</option>
        <option>Page 3</option>
        <option>Page 4</option>
        <option>Page 5</option>
    </select>
</ff-paging-select>
```


---

# 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.fact-finder.com/webcomponents-overview/web-components-4.x./api/navigation/paging-dropdown.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.
