Skip to main content

Module grid

Module grid 

Source
Expand description

2D tile reorder: SortableGrid displays a flat Vec in cols columns and emits the same SortEvents as SortableList, applied with crate::sortable::apply_sort (insert-and-reflow) or crate::sortable::apply_swap (tiles trade places). The full reference for both components lives with the crate::sortable module docs, docs/api/sortable-lists.md.

Re-exports§

pub use SortableGrid_completions::Component::SortableGrid;

Structs§

SortableGridProps
Properties for the SortableGrid component.

Functions§

SortableGrid
A grid of tiles reordered (or swapped) by dragging.
cell_of
(row, col) of a flat index in a grid with cols columns.
index_of
Flat index of (row, col) in a grid with cols columns, or None if outside len.