Expand description
Shared paging primitives for Orbital apps.
This crate provides Page and PageRequest — the canonical wire types
for offset/limit pagination across all [leptos] server functions. Because it
has no UI or framework dependencies, any crate in the workspace can depend
on it without introducing cycles.
When the leptos feature is enabled, this crate also provides
[use_paged_infinite_scroll] — a reusable hook that encapsulates the
4-signal + use_infinite_scroll callback pattern for paginated lists.
§Example
use orbital_paging::{Page, PageRequest};
let request = PageRequest::new(0, 10);
assert_eq!(request.offset, 0);
assert_eq!(request.limit, 10);
let page: Page<String> = Page {
items: vec!["a".into(), "b".into()],
has_more: false,
total_count: Some(2),
next_request_offset: None,
};
assert!(!page.has_more);Structs§
- Filter
Query - Structured filter query on the wire.
- Filter
Rule Param - Single filter rule on the wire.
- Page
- A single page of results returned by a server function.
- Page
Request - Client-to-server pagination and query parameters.
- Sort
Param - Single sort column on the wire.
Enums§
- Filter
Logic Wire - How multiple filter rules combine on the wire.
- Sort
Direction Wire - Sort direction on the wire.