mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 00:03:08 +00:00
handle better appschemaform initialization
This commit is contained in:
@@ -173,7 +173,6 @@
|
||||
}
|
||||
if ((value == undefined || value == null) && !ignoreValueUndefined) {
|
||||
value = structuredClone(defaultValue)
|
||||
console.log('computeDefaultValue', value, defaultValue)
|
||||
if (defaultValue === undefined || defaultValue === null) {
|
||||
if (inputCat === 'string') {
|
||||
value = nullable ? null : ''
|
||||
@@ -185,7 +184,6 @@
|
||||
value = []
|
||||
}
|
||||
} else if (inputCat === 'object') {
|
||||
console.log('computeDefaultValue object', value)
|
||||
evalValueToRaw()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
})
|
||||
|
||||
let result: Schema | undefined = undefined
|
||||
let args: Record<string, unknown> = {}
|
||||
let args: Record<string, unknown> = outputs?.values?.peak() ?? {}
|
||||
|
||||
function handleArgsChange() {
|
||||
const newArgs: Record<string, unknown> = {}
|
||||
@@ -76,6 +76,7 @@
|
||||
$componentControl[id] = {
|
||||
setValue(nvalue: any) {
|
||||
args = nvalue
|
||||
outputs.values.set(nvalue, false)
|
||||
},
|
||||
invalidate(key: string, error: string) {
|
||||
schemaForm?.invalidate(key, error)
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
function handleDefault(defaultValue: string | undefined) {
|
||||
if (initialHandleDefault) {
|
||||
initialHandleDefault = false
|
||||
return
|
||||
if (value != undefined && value != '') {
|
||||
return
|
||||
}
|
||||
}
|
||||
value = defaultValue
|
||||
}
|
||||
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "windmill",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
Reference in New Issue
Block a user