Pagination builder
First, previous, next, and last, plus a numbered range when there is one.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::navigation::Pagination;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
page(page: usize) -> Self
total_pages(total: usize) -> Self
unknown_total(has_next: bool) -> Self
total(total: PageTotal) -> Self
siblings(siblings: usize) -> Self
page_size(select: Entity<Select>) -> Self
on_select(handler: impl Fn(usize, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.