View Source PhoenixDuskmoon.Component.Pagination (PhoenixDuskmoon v6.0.4)

Duskmoon UI Pagination Component

Summary

Functions

Generates a pagination.

Generates a Pagination. Use daisyui style.

Functions

dm_pagination(assigns)

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 to false.

  • class (:any) - html attribute class. Defaults to "".

  • page_size (:integer) - items shows per page. Defaults to 10.

  • page_num (:integer) - page num. Defaults to 1.

  • total (:integer) - total items count. Defaults to 0.

  • update_event (:string) - Phoenix live event name for page status update. Defaults to "update_current_page".

  • page_url (:any) - Page url. Defaults to nil.

  • 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".

Slots

  • inner_block - Page slot.

dm_pagination_thin(assigns)

Generates a Pagination. Use daisyui 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 to false.
  • class (:any) - html attribute class. Defaults to "".
  • loading (:boolean) - when loading, disable the pagination. Defaults to false.
  • show_page_jumper (:boolean) - show quick jumper. Defaults to false.
  • page_size (:integer) - items shows per page. Defaults to 10.
  • page_num (:integer) - page num. Defaults to 1.
  • total (:integer) - total items count. Defaults to 0.
  • update_event (:string) - Phoenix live event name for page status update. Defaults to "update_current_page".