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>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.
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
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
expand()
Expands the dropdown element.
collapse()
Collapses the dropdown element.
toggle(expand?: Boolean)
Opens or closes the element, based on its current state.
Events
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
pages (Array)
An array of displayed page numbers. Set this through JavaScript only.
Events
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?