Commit a177a302 by heheer Committed by GitHub

fix: plugin input (#2567)

parent 034108c2
......@@ -58,7 +58,7 @@ const RenderInput = () => {
useEffect(() => {
if (isEqual(getValues(), defaultFormValues)) return;
reset(historyFormValues || defaultFormValues);
}, [defaultFormValues, historyFormValues]);
}, [defaultFormValues, getValues, historyFormValues, reset]);
const isDisabledInput = histories.length > 0;
......@@ -72,6 +72,7 @@ const RenderInput = () => {
name={input.key}
rules={{
validate: (value) => {
if (!input.required) return true;
if (input.valueType === WorkflowIOValueTypeEnum.boolean) {
return value !== undefined;
}
......
......@@ -199,6 +199,8 @@ const FieldEditModal = ({
if (isToolInput) {
data.toolDescription = data.description;
} else {
data.toolDescription = undefined;
}
data.label = data.key;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment