This crate is a part of rat-salsa.
For examples see rat-ftable2 GitHub.
Table widgets for ratatui
Improves over ratatui-Table by rendering only the visible parts of the data instead of building Row/Cell structs with the table data.
This is an iteration of the API design from rat-ftable. It doesn't need a data trait and can use a plain old Iterator and all the cell-rendering is done with closures.
This keeps the table rendering nicely in one place.
-
Table data is set as an Iterator.
- Rendering a cell is done in a closure for each column.
- Extra closure for rendering a full row regardless of column bounds.
- There is one more closure for a data-dependent row-height.
-
Horizontal scrolling (cell/column).
-
Flex layout for columns.
-
Varying row heights.
-
Different selection-models (Cell, Row, RowSet)
- Can provide your own too.
-
Event-handling for crossterm.
There are two table widgets
- Table - Uses an Iterator for the row-data.
- TableVec - Keeps a Vec of the data in its state.
And one more widget
- TableEditVec - Table widget + inline editing of a row.
- Use any widget to edit the cell-value.