fix: workflow inputs panel

This commit is contained in:
StyleZhang 2024-09-20 18:00:35 +08:00
parent ab19fccf3d
commit 0cb50dd4a5

View File

@ -56,13 +56,17 @@ const InputsPanel = ({ onRun }: Props) => {
}, [fileSettings?.image?.enabled, startVariables]) }, [fileSettings?.image?.enabled, startVariables])
const handleValueChange = (variable: string, v: any) => { const handleValueChange = (variable: string, v: any) => {
const {
inputs,
setInputs,
} = workflowStore.getState()
if (variable === '__image') { if (variable === '__image') {
workflowStore.setState({ workflowStore.setState({
files: v, files: v,
}) })
} }
else { else {
workflowStore.getState().setInputs({ setInputs({
...inputs, ...inputs,
[variable]: v, [variable]: v,
}) })