Hide field stats component if there is nothing to show

This commit is contained in:
Eike Kettner 2021-02-14 23:28:53 +01:00
parent 31cb8284a5
commit dec6148df6

View File

@ -152,7 +152,10 @@ view2 classes stats =
} }
] ]
, div [ class "flex-grow" ] , div [ class "flex-grow" ]
[ table [ class "w-full text-sm" ] [ table
[ class "w-full text-sm"
, classList [ ( "hidden", List.isEmpty fields ) ]
]
[ thead [] [ thead []
[ tr [ class "" ] [ tr [ class "" ]
[ th [ class "py-2 text-left" ] [] [ th [ class "py-2 text-left" ] []