Expand description
Large-data surfaces: a virtualized list, two tables, and a tree.
Table lays out every row it is given as Table::rows, because the
caller built those elements already; handed a count and a closure through
Table::rows_from, it lays out only the ones its viewport holds.
DataGrid takes a render closure and lays out only the rows its viewport
holds, which is what buys it column resizing and reordering, a pinned
group, selection over an incompletely loaded set, opened rows, and cell
editing. docs/components.md has the guidance on which to reach for.
None of these owns the data. Rows, order, expansion, and selection are all caller-owned; each surface reports what was operated and renders exactly what the caller says is true, so a host that refuses a change keeps showing the state that still holds.
The rule that separates these from the rest of the library: only rendered
rows publish semantics. A virtualized surface holds a viewport, not a
data set, so a test can assert only what is on screen. The container node
carries the total in value, which is how a snapshot stays honest about
the difference between a thousand items and the twelve that are drawn. A
Tree counts the rows it disclosed, so a node under a shut branch, a
disclosed node that scrolled past the edge, and a node that is not in the
data at all remain three different things.
Virtualization needs a bounded viewport. Every surface here takes a
visible_rows bound, and without one it sizes itself to its content and
lays every row out — which is the right answer for a settings summary and
the wrong one for a hundred thousand log lines.
Re-exports§
pub use diagnostics_list::Diagnostic;pub use diagnostics_list::DiagnosticAction;pub use diagnostics_list::DiagnosticFilter;pub use diagnostics_list::DiagnosticLocation;pub use diagnostics_list::DiagnosticSeverity;pub use diagnostics_list::DiagnosticsList;pub use grid::BulkBar;pub use grid::DataGrid;pub use grid::EditIntent;pub use grid::EditOutcome;pub use grid::EditingCell;pub use grid::Expanded;pub use grid::GridColumn;pub use grid::GridLines;pub use grid::GridRow;pub use grid::SelectionChange;pub use grid::SelectionMode;pub use list::List;pub use list::ListItem;pub use table::Align;pub use table::Cell;pub use table::Column;pub use table::ColumnWidth;pub use table::Row;pub use table::SortDirection;pub use table::Table;pub use tree::Tree;pub use tree::TreeNode;pub use tree_grid::TreeGrid;pub use tree_grid::TreeGridRow;pub use viewport::reveal_row;pub use viewport::scroll_to_row;
Modules§
- diagnostics_
list - A product-neutral diagnostic surface over caller-owned data.
- grid
- A virtualized, column-oriented grid over caller-owned rows.
- list
- A virtualized list over a caller-owned data set.
- table
- A column-oriented table over caller-owned rows.
- tree
- A hierarchy whose open branches are caller-owned.
- tree_
grid - A virtualized grid over a caller-flattened hierarchy.
- viewport
- Where a virtualized surface is scrolled to.