From 1c1a3fcc6dbd36af67fa367ad33c17cdc3551e06 Mon Sep 17 00:00:00 2001 From: Mirza Hanan Date: Fri, 20 Sep 2024 07:18:28 +0500 Subject: [PATCH] fix(blue-print): newly Added Attributes Only Visible --- .../ModalsContainer/BlueprintModal/Body/Editor/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx index 794e6171b..f2fd692f1 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx @@ -263,8 +263,7 @@ export const Editor = ({ const attributesValue = watch('attributes') const attributes: Attribute[] = useMemo( - () => - isAttributeArray(attributesValue) ? attributesValue.filter((attr) => attr.key && attr.key.trim() !== '') : [], + () => (isAttributeArray(attributesValue) ? attributesValue : []), [attributesValue], ) @@ -515,7 +514,7 @@ export const Editor = ({ setValue(`selectedIndex`, val?.value)} - options={attributes.map((attr) => ({ label: attr.key, value: attr.key }))} + options={attributes.filter((attr) => attr.key).map((attr) => ({ label: attr.key, value: attr.key }))} />