Crate rat_ftable
source ·Expand description
§Table widget based on ratatui.
Could 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 variant that takes an Iterator of TableRowData. It has as few traps though. 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 offset for rendering.
- Pluggable selection with TableSelection
- Allows row/column/cell selection.
- Row/column/cell selection + Header/Footer selection each with its own style.
- Basic key/mouse handling present.
Eventhandling is currently crossterm only. In practice event-handling is calling 1 or 2 functions on the state, so this should be easy to map to other systems. (Contributions welcome :)
Modules§
- Editing support for Table.
- Eventhandling.
- Different selection models for Table.
- Implements a Row and a Cell struct that are compatible to ratatui. You only need these if you use preformatted data.
Structs§
- Table widget.
- Render-context for rendering a table-cell.
- Table state.
- Combined style.
Traits§
- Trait for accessing the table-data by the Table.
- Trait for accessing the table-data by the Table.
- Trait for the different selection models used by Table.
Functions§
- Handle all events for recognizing double-clicks.
- Handle all events. Text events are only processed if focus is true. Mouse events are processed if they are in range.