From 4a869528100525e049f134a812f7bde19b9f4287 Mon Sep 17 00:00:00 2001 From: Andre H Date: Fri, 1 Mar 2024 11:26:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20prevent=20'gap'=20due?= =?UTF-8?q?=20to=20empty=20div=20on=20Select?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/shared/Select/Select.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/components/shared/Select/Select.tsx b/packages/frontend/src/components/shared/Select/Select.tsx index 963cc0bb..6e53ee5c 100644 --- a/packages/frontend/src/components/shared/Select/Select.tsx +++ b/packages/frontend/src/components/shared/Select/Select.tsx @@ -284,15 +284,15 @@ export const Select = ({ onClear?.(); }; - const renderLabels = useMemo( - () => ( -
+ const renderLabels = useMemo(() => { + if (!label && !description) return null; + return ( +

{label}

{description}

- ), - [theme, label, description], - ); + ); + }, [theme, label, description]); const renderLeftIcon = useMemo(() => { return (