From dec6148df6829ed63fb46e3fe2cab6269f75d826 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sun, 14 Feb 2021 23:28:53 +0100 Subject: [PATCH] Hide field stats component if there is nothing to show --- modules/webapp/src/main/elm/Comp/SearchStatsView.elm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/webapp/src/main/elm/Comp/SearchStatsView.elm b/modules/webapp/src/main/elm/Comp/SearchStatsView.elm index 3d37c6b2..6edab65d 100644 --- a/modules/webapp/src/main/elm/Comp/SearchStatsView.elm +++ b/modules/webapp/src/main/elm/Comp/SearchStatsView.elm @@ -152,7 +152,10 @@ view2 classes stats = } ] , div [ class "flex-grow" ] - [ table [ class "w-full text-sm" ] + [ table + [ class "w-full text-sm" + , classList [ ( "hidden", List.isEmpty fields ) ] + ] [ thead [] [ tr [ class "" ] [ th [ class "py-2 text-left" ] []