mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 00:04:10 +00:00
convert from dynamic expr to raw
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
bind:value={propertiesTypes[argName]}
|
||||
on:change={(e) => {
|
||||
if (e.detail === InputTransform.type.JAVASCRIPT) {
|
||||
args[argName].expr = getDefaultExpr(i ?? -1, argName)
|
||||
args[argName].expr = getDefaultExpr(i ?? -1, argName, args[argName].value)
|
||||
args[argName].value = undefined
|
||||
} else {
|
||||
args[argName].expr = undefined
|
||||
|
||||
@@ -159,10 +159,11 @@ export function getCodeInjectionExpr(code: string, isRaw: boolean): string {
|
||||
${expr}`
|
||||
}
|
||||
|
||||
export function getDefaultExpr(i: number, key: string = 'myfield') {
|
||||
export function getDefaultExpr(i: number, key: string = 'myfield', previousExpr?: string) {
|
||||
const expr = previousExpr ? `\`${previousExpr}\`` : `previous_result.${key}`
|
||||
return `import { previous_result, flow_input, step, variable, resource, params } from 'windmill@${i}'
|
||||
|
||||
previous_result.${key}`
|
||||
${expr}`
|
||||
}
|
||||
|
||||
export function getPickableProperties(
|
||||
|
||||
Reference in New Issue
Block a user