mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-22 02:50:45 +08:00
feat(bin): Use message for empty tables
This commit is contained in:
@@ -410,7 +410,14 @@ impl App {
|
||||
Column::new(Span::raw("Updated").bold(), Constraint::Length(16)).hide_small(),
|
||||
];
|
||||
|
||||
let table = ui.headered_table(frame, &mut selected, &patches, header.clone(), header);
|
||||
let table = ui.headered_table(
|
||||
frame,
|
||||
&mut selected,
|
||||
&patches,
|
||||
header.clone(),
|
||||
header,
|
||||
Some("No patches found".into()),
|
||||
);
|
||||
if table.changed {
|
||||
ui.send_message(Message::PatchesChanged {
|
||||
state: TableState::new(selected),
|
||||
|
||||
@@ -337,7 +337,7 @@ impl<'a> App<'a> {
|
||||
|
||||
let mut selected = state.selected_hunk();
|
||||
|
||||
let table = ui.headered_table(frame, &mut selected, &hunks, header, columns);
|
||||
let table = ui.headered_table(frame, &mut selected, &hunks, header, columns, None);
|
||||
if table.changed {
|
||||
ui.send_message(Message::HunkChanged {
|
||||
state: TableState::new(selected),
|
||||
|
||||
@@ -131,6 +131,7 @@ where
|
||||
self.selected,
|
||||
self.items,
|
||||
self.header.to_vec(),
|
||||
None,
|
||||
if *self.show_search {
|
||||
Some(Borders::BottomSides)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user