mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 17:46:42 +01:00
wip: drawing table using Content::content
This commit is contained in:
parent
c3b9e0d9ec
commit
53132da551
5 changed files with 70 additions and 47 deletions
|
|
@ -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))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue