fix: plugin input (#2567)

This commit is contained in:
heheer
2024-08-29 14:19:16 +08:00
committed by GitHub
parent 034108c218
commit a177a302d4
2 changed files with 4 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -199,6 +199,8 @@ const FieldEditModal = ({
if (isToolInput) {
data.toolDescription = data.description;
} else {
data.toolDescription = undefined;
}
data.label = data.key;