yew_datatable/lib.rs
1//! # yew-datatable
2//!
3//! A data table component library for Yew applications.
4//! Built on top of `yew-datatable-core`, providing idiomatic Yew components and hooks.
5//!
6//! ## Features
7//!
8//! - Fully-featured data table with sorting, filtering, pagination
9//! - Type-safe column definitions
10//! - Headless design with customizable rendering
11//! - Yew hooks for state management
12//!
13//! ## Example
14//!
15//! ```rust,ignore
16//! use yew::prelude::*;
17//! use yew_datatable::prelude::*;
18//!
19//! #[function_component(MyTable)]
20//! fn my_table() -> Html {
21//! let columns = vec![
22//! ColumnDefBuilder::new("name", "Name")
23//! .accessor(|row: &Person| row.name.clone())
24//! .build(),
25//! ColumnDefBuilder::new("age", "Age")
26//! .accessor(|row: &Person| row.age as i32)
27//! .build(),
28//! ];
29//!
30//! let data = vec![
31//! Person { name: "Alice".into(), age: 30 },
32//! Person { name: "Bob".into(), age: 25 },
33//! ];
34//!
35//! html! {
36//! <DataTable<Person> {columns} {data} />
37//! }
38//! }
39//! ```
40
41/// Yew components for rendering data tables.
42///
43/// Provides pre-built table components including the main table,
44/// header, body, and pagination components.
45pub mod components;
46
47/// Yew hooks for table state management.
48///
49/// Provides the `use_table` hook for creating and managing
50/// table instances within Yew components.
51pub mod hooks;
52
53/// Re-exports for convenient access to all public types.
54///
55/// Import this module to get access to the most frequently used
56/// types from both the core engine and UI components.
57pub mod prelude;
58
59/// Re-export the core crate for direct access to all types.
60pub use yew_datatable_core as core;