Skip to content

Commit 39cf62f

Browse files
committed
Add indicator for sort direction
1 parent be3a9d9 commit 39cf62f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/vector-top/src/dashboard.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,16 @@ impl<'a> Widgets<'a> {
244244
.map(|c| c.matches_header(s))
245245
.unwrap_or_default()
246246
{
247-
c = c.add_modifier(Modifier::REVERSED);
247+
c = c
248+
.content(format!(
249+
"{s} {}",
250+
if state.sort_state.reverse {
251+
"▼"
252+
} else {
253+
"▲"
254+
}
255+
))
256+
.add_modifier(Modifier::REVERSED);
248257
}
249258
c
250259
})

0 commit comments

Comments
 (0)