diff --git a/client/src/pages/platform/workflow-editor/components/Properties/ArrayProperty.tsx b/client/src/pages/platform/workflow-editor/components/Properties/ArrayProperty.tsx index ce0407b2768..0bb8b48a02a 100644 --- a/client/src/pages/platform/workflow-editor/components/Properties/ArrayProperty.tsx +++ b/client/src/pages/platform/workflow-editor/components/Properties/ArrayProperty.tsx @@ -54,7 +54,7 @@ const ArrayProperty = ({onDeleteClick, path, property}: ArrayPropertyProps) => { custom: true, expressionEnabled: true, key: getRandomId(), - label: `Item ${arrayItems.length.toString()}`, + label: `${matchingItem?.label ?? 'Item'} ${arrayItems.length.toString()}`, name: `${name}__${arrayItems.length.toString()}`, path: `${path}[${arrayItems.length.toString()}]`, type: (matchingItem?.type as PropertyType) || (newPropertyType as PropertyType) || 'STRING', @@ -130,12 +130,6 @@ const ArrayProperty = ({onDeleteClick, path, property}: ArrayPropertyProps) => { } }, [availablePropertyTypes]); - useEffect(() => { - if (currentComponent?.componentName === 'condition' && availablePropertyTypes.length) { - setNewPropertyType(availablePropertyTypes[0].value); - } - }, [currentComponent?.componentName, availablePropertyTypes]); - // render individual array items with data gathered from parameters useEffect(() => { if ( @@ -261,12 +255,6 @@ const ArrayProperty = ({onDeleteClick, path, property}: ArrayPropertyProps) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - useEffect(() => { - if (property.items?.length) { - setArrayItems(property.items); - } - }, [property.items]); - return (