fix minor flow UX

This commit is contained in:
Ruben Fiszel
2023-03-16 01:18:11 +01:00
parent 857b57deb8
commit eebc6ddee6
4 changed files with 12 additions and 2 deletions

View File

@@ -152,6 +152,8 @@
value = enum_?.[0]
} else if (inputCat == 'boolean') {
value = false
} else if (inputCat == 'list') {
value = []
}
}
}
@@ -288,7 +290,7 @@
on:click={() => {
value = value.filter((el) => el != v)
if (value.length == 0) {
value = undefined
value = []
}
}}
>

View File

@@ -60,6 +60,7 @@
if (testJob && !testJob.canceled && testJob.type == 'CompletedJob' && `result` in testJob) {
if ($flowStateStore[mod.id]?.previewResult) {
$flowStateStore[mod.id].previewResult = testJob.result
$flowStateStore = $flowStateStore
}
}
}

View File

@@ -200,6 +200,10 @@
}
function initPath() {
if (path != undefined && path != '') {
meta = pathToMeta(path)
return
}
if (initialPath == undefined || initialPath == '') {
reset()
} else {

View File

@@ -93,7 +93,10 @@
pureViewer={!$propPickerConfig}
json={flowInputsFiltered}
on:select={(e) => {
dispatch('select', `flow_input.${e.detail}`)
dispatch(
'select',
e.detail?.startsWith('[') ? `flow_input${e.detail}` : `flow_input.${e.detail}`
)
}}
/>
</div>