From 4688968a32a6812d4751a013ad1b605232fe12f8 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Tue, 25 Feb 2025 11:00:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/components/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/components/mod.rs b/src/ui/components/mod.rs index 3f6eba6..32e280a 100644 --- a/src/ui/components/mod.rs +++ b/src/ui/components/mod.rs @@ -820,7 +820,9 @@ impl UIWidget for TabWidget { div id=(format!("#tab_content_{tab_id}")) { @for (_, id, body) in &self.content { - div class="hidden rounded-lg" id=(id) role="tabpanel" aria-labelledby=(format!("{id}_tab")) { + div class=(format!("{} rounded-lg", + if *id == self.active { "" } else { "hidden" } + )) id=(id) role="tabpanel" aria-labelledby=(format!("{id}_tab")) { (body) } }