mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 16:02:19 +00:00
fix: fix isValid state when schema is empty
This commit is contained in:
@@ -241,7 +241,7 @@
|
||||
) {
|
||||
return randomHash()
|
||||
} else {
|
||||
console.log('path', path)
|
||||
// console.log('path', path)
|
||||
return path as string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,11 +337,11 @@
|
||||
'openSearchWithPrefilledText'
|
||||
)
|
||||
|
||||
$effect(() => {
|
||||
$effect.pre(() => {
|
||||
;[meta?.name, meta?.owner, meta?.ownerKind]
|
||||
meta && untrack(() => onMetaChange())
|
||||
})
|
||||
$effect(() => {
|
||||
$effect.pre(() => {
|
||||
if ($workspaceStore && $userStore) {
|
||||
untrack(() => {
|
||||
loadFolders()
|
||||
|
||||
@@ -335,7 +335,12 @@
|
||||
})
|
||||
|
||||
function setDefaultValid(schema: Record<string, any> | undefined) {
|
||||
isValid = schema?.properties && Object.keys(schema.properties).length === 0
|
||||
if (!isValid) {
|
||||
let isEmpty = schema?.properties == undefined || Object.keys(schema.properties).length === 0
|
||||
if (isEmpty) {
|
||||
isValid = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function loadScript(p: string | undefined): Promise<void> {
|
||||
@@ -680,6 +685,7 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<!-- {JSON.stringify({ allowSchedule, path: script_path, validCRON, isValid })} -->
|
||||
{#snippet saveButton()}
|
||||
{#if !drawerLoading}
|
||||
<TriggerEditorToolbar
|
||||
|
||||
Reference in New Issue
Block a user