public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] fix: ui: set sort function for datastore comment column
@ 2026-12-01 14:55 Shan Shaji
  2026-12-01 18:29 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Shan Shaji @ 2026-12-01 14:55 UTC (permalink / raw)
  To: pdm-devel

The datastore content view does not support sorting the tree by the
comment column, unlike PBS. Set a sorter callback to fix it.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---

 I'm not sure if disabling sorting by comments was intentional. If it
 was, feel free to ignore this.

 ui/src/pbs/snapshot_list.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/src/pbs/snapshot_list.rs b/ui/src/pbs/snapshot_list.rs
index eccca26c..dfd1589a 100644
--- a/ui/src/pbs/snapshot_list.rs
+++ b/ui/src/pbs/snapshot_list.rs
@@ -401,6 +401,9 @@ impl SnapshotListComp {
                 .into(),
             DataTableColumn::new(tr!("Comment"))
                 .width("minmax(140px, 1fr)")
+                .sorter(|a: &SnapshotTreeEntry, b: &SnapshotTreeEntry| {
+                    sort_key(a, a.comment()).cmp(&sort_key(b, b.comment()))
+                })
                 .render_cell(render_comment)
                 .into(),
             DataTableColumn::new(tr!("Backup Time"))
--
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-01 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 14:55 [PATCH datacenter-manager] fix: ui: set sort function for datastore comment column Shan Shaji
2026-12-01 18:29 ` applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal