

[](https://crates.io/crates/rat-ftable2)
[](https://docs.rs/rat-ftable2)
[](https://opensource.org/licenses/MIT)
[](https://www.apache.org/licenses/LICENSE-2.0)

This crate is a part of [rat-salsa][refRatSalsa].
For examples see [rat-ftable2 GitHub][refGitHubFTable2].
* [Changes](https://github.com/thscharler/rat-salsa/blob/master/rat-ftable2/changes.md)
# 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][refFTable].
> 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.
[refRatSalsa]: https://docs.rs/rat-salsa/latest/rat_salsa/
[refFTable]: https://docs.rs/rat-ftable/latest/rat_ftable/
[refGitHubFTable2]: https://github.com/thscharler/rat-salsa/blob/master/rat-ftable2/examples