From a3a8863f46295055172a255d4dfe6c96aa5d8a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Paunovi=C4=87?= Date: Mon, 3 Feb 2025 11:35:03 +0100 Subject: [PATCH] feat(ui): multiple improvements of no code editor (#7146) * refactor(ui): prevent multiple warning in console by adding inheritAttrs properly * chore(ui): make plugin selector field not clearable * feat(ui): allow re-ordering of array items * fix(ui): remove concurrency when limit set to 0 --- .../code/components/inputs/InputText.vue | 2 ++ ui/src/components/code/styles/code.scss | 6 ++-- ui/src/components/flows/TaskEditor.vue | 1 + ui/src/components/flows/tasks/TaskArray.vue | 30 +++++++++++++++++-- ui/src/components/inputs/EditorView.vue | 6 ++-- ui/src/components/plugins/PluginSelect.vue | 1 - 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/ui/src/components/code/components/inputs/InputText.vue b/ui/src/components/code/components/inputs/InputText.vue index 146a9f1de25..e3418690968 100644 --- a/ui/src/components/code/components/inputs/InputText.vue +++ b/ui/src/components/code/components/inputs/InputText.vue @@ -16,6 +16,8 @@ + + diff --git a/ui/src/components/inputs/EditorView.vue b/ui/src/components/inputs/EditorView.vue index 57bdef2737d..edf9f021cf3 100644 --- a/ui/src/components/inputs/EditorView.vue +++ b/ui/src/components/inputs/EditorView.vue @@ -940,15 +940,13 @@ }; const onUpdateMetadata = (event, shouldSave) => { - metadata.value = event; - if(shouldSave) { - metadata.value = {...metadata.value, ...event}; + metadata.value = {...metadata.value, ...(event.concurrency.limit === 0 ? {concurrency: null} : event)}; onSaveMetadata(); validateFlow(flowYaml.value) } else { - metadata.value = event; + metadata.value = event.concurrency.limit === 0 ? {concurrency: null} : event; } }; diff --git a/ui/src/components/plugins/PluginSelect.vue b/ui/src/components/plugins/PluginSelect.vue index 85acbca433e..337bcac7dec 100644 --- a/ui/src/components/plugins/PluginSelect.vue +++ b/ui/src/components/plugins/PluginSelect.vue @@ -3,7 +3,6 @@ :model-value="modelValue" :placeholder="$t('no_code.creation.select', {section: section.toLowerCase().slice(0, -1)})" filterable - clearable @update:model-value="onInput" >