pub struct PaginationPagesProps {
pub state: Store<PaginationState>,
pub display_page_count: usize,
pub margin_page_count: usize,
pub separator: Signal<String>,
pub anchor_class: Signal<String>,
pub li_class: Signal<String>,
pub active_class: Signal<String>,
pub ul_class: Signal<String>,
pub separator_class: Signal<String>,
}Expand description
Props for the PaginationPages component.
A component that renders pagination page controls.
§Example
§Required Props
- state: [
Store<PaginationState>]- The current state of the pagination. This is used to communicate with the PaginatedFor component.
§Optional Props
- display_page_count:
usize-
How many pages to show around the current page. This number includes the current page.
A value of 3 will display one page before and one page after the current page. It’s recommended to use odd numbers to ensure symmetry.
Default is 5.
-
- margin_page_count:
usize-
How many pages to show at the beginning and end of the pagination.
Default is 1.
-
- separator:
impl Into<Signal<String>>-
The separator to use between page ranges.
Default is “…”
-
- anchor_class:
impl Into<Signal<String>>- The class of the
<a>element that represents a page.
- The class of the
- li_class:
impl Into<Signal<String>>- The class of the
<li>element that wraps the<a>element that represents a page.
- The class of the
- active_class:
impl Into<Signal<String>>- The class of the
<li>element that represents an active page. This will be used instead of theli_classwhen the page is active.
- The class of the
- ul_class:
impl Into<Signal<String>>- Every range is put inside an
<ul>element. The class of this<ul>element can be customized using this prop.
- Every range is put inside an
- separator_class:
impl Into<Signal<String>>- The class of the
<div>element that contains the separator.
- The class of the
Fields§
§state: Store<PaginationState>The current state of the pagination. This is used to communicate with the PaginatedFor component.
display_page_count: usizeHow many pages to show around the current page. This number includes the current page.
A value of 3 will display one page before and one page after the current page. It’s recommended to use odd numbers to ensure symmetry.
Default is 5.
margin_page_count: usizeHow many pages to show at the beginning and end of the pagination.
Default is 1.
separator: Signal<String>The separator to use between page ranges.
Default is “…”
anchor_class: Signal<String>The class of the <a> element that represents a page.
li_class: Signal<String>The class of the <li> element that wraps the <a> element that represents a page.
active_class: Signal<String>The class of the <li> element that represents an active page.
This will be used instead of the li_class when the page is active.
ul_class: Signal<String>Every range is put inside an <ul> element.
The class of this <ul> element can be customized using this prop.
separator_class: Signal<String>The class of the <div> element that contains the separator.
Implementations§
Source§impl PaginationPagesProps
impl PaginationPagesProps
Sourcepub fn builder() -> PaginationPagesPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> PaginationPagesPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building PaginationPagesProps.
On the builder, call .state(...), .display_page_count(...)(optional), .margin_page_count(...)(optional), .separator(...)(optional), .anchor_class(...)(optional), .li_class(...)(optional), .active_class(...)(optional), .ul_class(...)(optional), .separator_class(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of PaginationPagesProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaginationPagesProps
impl RefUnwindSafe for PaginationPagesProps
impl Send for PaginationPagesProps
impl Sync for PaginationPagesProps
impl Unpin for PaginationPagesProps
impl UnwindSafe for PaginationPagesProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more