From 4724fc304d1307d4dc86b64e1c0ea9a7cc3d7486 Mon Sep 17 00:00:00 2001 From: atanasster Date: Mon, 17 May 2021 09:27:18 +0300 Subject: [PATCH] fix: filter undefined from options --- ui/blocks/src/PropsTable/BasePropsTable.tsx | 24 +++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ui/blocks/src/PropsTable/BasePropsTable.tsx b/ui/blocks/src/PropsTable/BasePropsTable.tsx index 18a8f9f0b..90690bfcd 100644 --- a/ui/blocks/src/PropsTable/BasePropsTable.tsx +++ b/ui/blocks/src/PropsTable/BasePropsTable.tsx @@ -213,17 +213,19 @@ export const BasePropsTable: FC = ({ {Array.isArray(value) && value.length > 1 - ? value.map(({ name: typeName, value }) => ( - - {value || typeName} - - )) + ? value + .filter(({ value }) => value !== 'undefined') + .map(({ name: typeName, value }) => ( + + {value || typeName} + + )) : raw ?? typeName}