From 11a2d4dfdd42bed78c913d0b2b1563e077425acf Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Wed, 4 Aug 2021 17:07:20 -0400 Subject: [PATCH] fix: Remove grey bar for TableElement component when `metadata` is empty (#16054) * create serialize json function * remove grey space with no metadata * remove console log --- superset-frontend/src/SqlLab/components/TableElement.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/components/TableElement.tsx b/superset-frontend/src/SqlLab/components/TableElement.tsx index 775c9252f..d64ce2157 100644 --- a/superset-frontend/src/SqlLab/components/TableElement.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement.tsx @@ -133,7 +133,8 @@ const TableElement = ({ table, actions, ...props }: TableElementProps) => { )); } - if (!partitions && !metadata) { + if (!partitions && (!metadata || !metadata.length)) { + // hide partition and metadata card view return null; }