LiveAntd.Components.Pagination (live_antd v0.1.0)
A long list can be divided into several pages using Pagination, and only one page will be loaded at a time.
API
- [x]
current
: Current page number - [x]
defaultCurrent
: Default initial page number - [ ]
defaultPageSize
: Default number of data items per page - [ ]
disabled
: Disable pagination - [ ]
hideOnSinglePage
Whether to hide pager on single page - [ ]
itemRender
To customize item's innerHTML - [x]
pageSize
: Number of data items per page - [ ]
pageSizeOptions
: Specify the sizeChanger options - [ ]
responsive
: If size is not specified, Pagination would resize according to the width of the window - [ ]
showLessItems
: Show less page items - [ ]
showQuickJumper
: Determine whether you can jump to pages directly - [ ]
showSizeChanger
: Determine whether to show pageSize select, it will be true - [ ]
showTitle
: Show page item's title - [x]
showTotal
: To display the total number and range - [ ]
simple
: Whether to use simple mode boolean - - [ ]
size
: Specify the size of Pagination, can be set to small - [x]
total
: Total number of data items - [x]
onChange
: Called when the page number is changed, and it takes the resulting page number and pageSize as its arguments - [ ]
onShowSizeChange
: Called when pageSize is changed
Example
current_page: 1, next_page: nil, per_page: 10, prev_page: nil, total_count: 0, totalPages: 0
<Pagination
size={}
defaultCurrent={1}
total={50}
current={}
pageSize={}
onChange={}
/>
Properties
- showTotal :boolean, default: true
- size :string
- current :integer, default: 1
- total :integer
- onChange :event
- totalPages :integer, required: true, default: 0
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Link to this section Functions
Link to this function
mount(socket)
Callback implementation for Phoenix.LiveComponent.mount/1
.
Link to this function
render(assigns)
Callback implementation for Phoenix.LiveComponent.render/1
.
Link to this function
render_next_page(assigns)
Link to this function