28 releases (12 breaking)
0.28.0 | Nov 1, 2024 |
---|---|
0.26.0 | Oct 16, 2024 |
0.16.0 | Jul 3, 2024 |
#925 in Command-line interface
570 downloads per month
Used in 3 crates
(via rat-widget)
170KB
3.5K
SLoC
This crate is a part of rat-salsa.
For examples see rat-ftable GitHub.
Table widget for ratatui
Can be used as a drop-in replacement for the ratatui table. But that's not the point of this widget.
This widget uses the TableData trait instead of rendering all the table-cells and putting them into a Vec. This way rendering time only depends on the screen-size not on the size of your data.
There is a second trait TableDataIter that works better if you only have an Iterator over your data.
Caveat: If the Iterator doesn't have an efficient skip() or if you can't give the number of rows this will iterate all your data for the necessary information. This might slow down everything a bit.
More bullet points:
- Row and Column scrolling.
- Pluggable selection with TableSelection
- Allows row/column/cell selection.
- Row/column/cell selection + Header/Footer selection each with its own style.
- Key/mouse handling present.
Eventhandling is currently crossterm only.
Dependencies
~8–17MB
~242K SLoC