pub struct PaginationProps {
pub class: Class,
pub total: usize,
pub page_size: usize,
pub current_page: usize,
pub prev_text: SharedString,
pub next_text: SharedString,
pub prev: Option<VNode>,
pub next: Option<VNode>,
pub on_change: Option<EventHandler<usize>>,
}
Expand description
The Pagination
properties struct for the configuration of the component.
Fields§
§class: Class
The class attribute for the component.
total: usize
Total number of data items.
page_size: usize
Number of data items per page.
current_page: usize
The current page number.
prev_text: SharedString
The element for the previous button.
next_text: SharedString
The text for the next button.
prev: Option<VNode>
The element for the previous button.
next: Option<VNode>
The element for the next button.
on_change: Option<EventHandler<usize>>
An event handler to be called when the page number is changed.
Implementations§
Source§impl PaginationProps
impl PaginationProps
Sourcepub fn builder() -> PaginationPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> PaginationPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building PaginationProps
.
On the builder, call .class(...)
(optional), .total(...)
, .page_size(...)
(optional), .current_page(...)
, .prev_text(...)
(optional), .next_text(...)
(optional), .prev(...)
(optional), .next(...)
(optional), .on_change(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of PaginationProps
.
Trait Implementations§
Source§impl Clone for PaginationProps
impl Clone for PaginationProps
Source§fn clone(&self) -> PaginationProps
fn clone(&self) -> PaginationProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more