wip: drawing table using Content::content

This commit is contained in:
🪞👃🪞 2025-03-17 02:33:43 +02:00
parent c3b9e0d9ec
commit 53132da551
5 changed files with 70 additions and 47 deletions

View file

@ -51,10 +51,10 @@ impl<T> Columns<T> {
pub fn row_content (&self, entry: &T) -> impl Content<TuiOut> where T: Send + Sync {
Map::new(
||self.0.iter(),
|Column { width, value, .. }, index|map_east(
|&Column { width, ref value, .. }, index|map_east(
0u16,
*width as u16,
value(entry).map(|x|TrimString(*width as u16, x))
width as u16,
value(entry).map(|x|TrimString(width as u16, x))
)
)
}