[pdm-devel] [PATCH proxmox-datacenter-manager] ui: firewall: disable collapse tree button if nothing is selected

Hannes Laimer h.laimer at proxmox.com
Wed Dec 3 08:36:43 CET 2025


The expanding button is in the header of the panel on the right,
without a selection there is no heading. So it wasn't possible to expand
the tree again after collapsing it.

Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 ui/src/remotes/firewall/tree.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/src/remotes/firewall/tree.rs b/ui/src/remotes/firewall/tree.rs
index ad538e0..8b1c883 100644
--- a/ui/src/remotes/firewall/tree.rs
+++ b/ui/src/remotes/firewall/tree.rs
@@ -290,7 +290,8 @@ impl FirewallTreeComponent {
             .with_child(
                 Button::new_icon("fa fa-angle-double-left")
                     .onclick(ctx.link().callback(|_| Msg::ToggleTreePanel))
-                    .aria_label(tr!("Hide tree panel")),
+                    .aria_label(tr!("Hide tree panel"))
+                    .disabled(self.selected_entry.is_none()),
             );
 
         let scope_toolbar = Toolbar::new()
-- 
2.47.3





More information about the pdm-devel mailing list