mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-11 16:09:39 +00:00
fix(frontend): Fix connected property (#1371)
* fix(frontend): Fix connected property * fix(frontend): fix connected property * fix(frontend): fix connected property
This commit is contained in:
@@ -40,17 +40,24 @@
|
||||
schema.properties[argName].enum,
|
||||
schema.properties[argName].contentEncoding
|
||||
)
|
||||
|
||||
let propertyType = getPropertyType(arg)
|
||||
|
||||
function getPropertyType(arg: InputTransform | any): 'static' | 'javascript' {
|
||||
let type: 'static' | 'javascript' = arg?.type ?? 'static'
|
||||
if (type == 'javascript') {
|
||||
|
||||
if (
|
||||
type == 'javascript' &&
|
||||
isStaticTemplate(inputCat) &&
|
||||
(arg?.expr?.length === 0 || arg?.expr?.[0] === '`')
|
||||
) {
|
||||
const newValue = codeToStaticTemplate(arg.expr)
|
||||
if (newValue) {
|
||||
type = 'static'
|
||||
arg.value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
return type
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user