Components.ModelsTablePaginationNumeric Class
Numeric navigation used within models-table/footer.
Usage example:
<ModelsTable @data={{data}} @columns={{columns}} as |MT|>
<MT.Footer as |Footer|>
<Footer.PaginationNumeric />
{{! ... }}
</MT.Footer>
{{! .... }}
</ModelsTable>
Block usage example:
<ModelsTable @data={{data}} @columns={{columns}} as |MT|>
<MT.Footer as |Footer|>
<Footer.PaginationNumeric as |PN|>
{{#each PN.visiblePageNumbers as |page|}}
{{#if page.isLink}}
<button
class="{{MT.themeInstance.paginationNumericItem}} {{if page.isActive MT.themeInstance.paginationNumericItemActive}} {{MT.themeInstance.buttonDefault}}"
{{action MT.goToPage page.label}}>
{{page.label}}
</button>
{{else}}
<button
type="button"
class="{{MT.themeInstance.buttonDefault}} {{MT.themeInstance.paginationNumericItem}}"
disabled="disabled">
{{page.label}}
</button>
{{/if}}
{{/each}}
<PN.PageNumberSelect />
</Footer.PaginationNumeric>
</MT.Footer>
</ModelsTable>
ModelsTablePaginationNumeric yields references to the following contextual components:
- PageNumberSelect - selectbox with list of available pages
References to the following properties are yielded:
Item Index
Properties
Events
Properties
showCurrentPageNumberSelect
Boolean
Bound from ModelsTable.showCurrentPageNumberSelect
Default: null
visiblePageNumbers
Object[]
protected
List of links to the page Used if ModelsTable.useNumericPagination is true
Default: []
Events
goToPage
Closure action ModelsTable.gotoCustomPage