Flow inputs carry an origin hint, run or panel
The Inputs editor and the canvas label show it, and the run forms leave panel inputs out.
This commit is contained in:
@@ -94,9 +94,16 @@ export function initialText(inputs: FlowInput_Input[]): Record<string, string> {
|
||||
)
|
||||
}
|
||||
|
||||
/** The declared inputs worth drawing a field for. */
|
||||
/**
|
||||
* The declared inputs worth drawing a field for.
|
||||
*
|
||||
* A panel input is a control's to write, so a run keeps its starting value
|
||||
* and the form does not offer it as a parameter.
|
||||
*/
|
||||
export function declaredInputs(definition: FlowDef_Input): FlowInput_Input[] {
|
||||
return (definition.inputs ?? []).filter((one) => one.spec?.name)
|
||||
return (definition.inputs ?? []).filter(
|
||||
(one) => one.spec?.name && one.origin !== "panel",
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user