Table Interaction
This example demonstrates:
Table- row selection
- keyboard navigation
- summary updates
1Up / Down changes the selected row
2runtime routing hands the key to Table
3the selected row enters state
4the summary derives from that row
5runtime redraws only the regions that changed
Run:
cargo run -p ansiq-examples --example table_interaction
The real table_interaction example running in a terminal.
Widgets to study alongside this example
What this example is good for
Read this after List Navigation. It pushes the same core selection model into a more structured data shape:
- multiple columns instead of one label
- explicit row selection instead of a simple current item
- a summary panel derived from the selected row
How to read the code
A good order is:
- the row data
- how the current row is stored
- how the summary derives from that row
- only then the exact
Tableprops
Recommended companion reading
Last updated on