PhoenixDuskmoon.Component.Pagination (PhoenixDuskmoon v7.2.1)
View SourceDuskmoon UI Pagination Component
Summary
Functions
Generates a pagination.
Examples
<.dm_pagination page_num={5} page_size={15} total={100} update_event="update-page"/>Attributes
id(:any) - html attribute id. Defaults tofalse.class(:any) - html attribute class. Defaults to"".page_size(:integer) - items shows per page. Defaults to10.page_num(:integer) - page num. Defaults to1.total(:integer) - total items count. Defaults to0.show_total(:boolean) - whether show total items count. Defaults tofalse.update_event(:string) - Phoenix live event name for page status update. Defaults to"update_current_page".page_url(:any) - Page url. Defaults tonil.page_url_marker(:string) - Marker in page url. Default is{page}. Replace this marker with page number.Defaults to
"{page}".page_link_type(:string) - Phoenix link type. Defaults to"patch". Must be one of"patch","navigate", or"href".
Slots
inner_block- Page slot.
Generates a Pagination. Use duskmoonui style.
Examples
<.dm_pagination_thin page_num={5} page_size={15} total={100} update_event="update-page" loading={false} />Attributes
id(:any) - html attribute id. Defaults tofalse.class(:any) - html attribute class. Defaults to"".loading(:boolean) - when loading, disable the pagination. Defaults tofalse.show_page_jumper(:boolean) - show quick jumper. Defaults tofalse.page_size(:integer) - items shows per page. Defaults to10.page_num(:integer) - page num. Defaults to1.total(:integer) - total items count. Defaults to0.show_total(:boolean) - whether show total items count. Defaults tofalse.update_event(:string) - Phoenix live event name for page status update. Defaults to"update_current_page".