For the complete documentation index, see llms.txt. This page is also available as Markdown.

Paging Dropdown

`ff-paging-dropdown` and `ff-paging-select` provide compact controls for changing result pages. They support custom item, option, and select templates.

Documentation

ff-paging-dropdown

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

<ff-paging-dropdown></ff-paging-dropdown>

ff-paging-dropdown displays the current page number plus up to four pages each before and after the currently selected page.

show-selected

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

<ff-paging-dropdown show-selected></ff-paging-dropdown>

paging-item

Different to an ff-paging element, ff-paging-dropdown accepts only one ff-paging-item as a template for all generated pages.

You can access the value of a paging item with the {{page}} syntax.

<ff-paging-dropdown show-selected>
    <ff-paging-item>{{page}}</ff-paging-item>
</ff-paging-dropdown>

Rendered HTML

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

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 providing any custom templates. However, you can still define your own select and/or option.

ff-paging-select displays the current page number plus up to four pages each before and after the currently selected page.

The most basic setup:

Will act like:

You may customize only the select element:

Or just the option:

Or both of them:

Rendered HTML

Suppose the current search result is for page 2, the last example above will produce the following HTML:

Demo

API

ff-paging-dropdown

Properties

Name
Description

pages (Array)

An array of displayed page numbers. Set this through JavaScript only.

show-selected (Boolean)

When present, the selected paging item is shown in the dropdown container.

collapse-onblur (String) (default: "true")

When "true", the element closes automatically after it loses focus.

opened (Boolean)

Indicates whether this element is opened by default.

Methods

Name
Description

expand()

Expands the dropdown element.

collapse()

Collapses the dropdown element.

toggle(expand?: Boolean)

Opens or closes the element, based on its current state.

Events

Name
Description

dom-updated

This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out.

ff-paging-select

Properties

Name
Description

pages (Array)

An array of displayed page numbers. Set this through JavaScript only.

Events

Name
Description

dom-updated

This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out.

Last updated

Was this helpful?