From 9755bacc55c86fe7823d1a5e7821b31eec1815d2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 2 Nov 2024 18:25:47 +0100 Subject: [PATCH] Divide per group only when there is at least one group defined --- virtweb_frontend/src/routes/VMListRoute.tsx | 35 ++++++++++++--------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/virtweb_frontend/src/routes/VMListRoute.tsx b/virtweb_frontend/src/routes/VMListRoute.tsx index 4b549aa..ccb788a 100644 --- a/virtweb_frontend/src/routes/VMListRoute.tsx +++ b/virtweb_frontend/src/routes/VMListRoute.tsx @@ -112,21 +112,26 @@ function VMListWidget(p: { {p.groups.map((g, num) => ( - - - toggleHiddenGroup(g)}> - {!hiddenGroups?.has(g) ? ( - - ) : ( - - )} - - {g ?? "default"} - - + {p.groups.length > 1 && ( + + + toggleHiddenGroup(g)} + > + {!hiddenGroups?.has(g) ? ( + + ) : ( + + )} + + {g ?? "default"} + + + )} {!hiddenGroups.has(g) && p.list