Files
windmill/frontend/src/lib/components/InputTransformPickers.svelte
T
hugocasaandClaude Opus 5.5 be05d96489 refactor: share one variable picker that reloads after a variable is created (#12177)
* refactor: share one variable picker that reloads after a variable is created

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: format the trigger editors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep the variable picker's Edit/View button where it was

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:11:56 +01:00

36 lines
952 B
Svelte

<script lang="ts">
import type ItemPicker from './ItemPicker.svelte'
import type VariableEditor from './VariableEditor.svelte'
import VariablePicker from './VariablePicker.svelte'
interface Props {
/** The transforms being edited. A picked variable is written into `pickForField`'s. */
args?: Record<string, any>
/** Which field the open picker is picking for, set by whichever row opened it. */
pickForField?: string | undefined
workspace?: string | undefined
/** Handed back so every field's form can open them. */
itemPicker?: ItemPicker | undefined
variableEditor?: VariableEditor | undefined
}
let {
args = {},
pickForField = undefined,
workspace = undefined,
itemPicker = $bindable(),
variableEditor = $bindable()
}: Props = $props()
</script>
<VariablePicker
bind:itemPicker
bind:variableEditor
{workspace}
onPick={(path) => {
if (pickForField) {
args[pickForField].value = '$var:' + path
}
}}
/>