Skip to content

Commit

Permalink
fix: plugin input (#2567)
Browse files Browse the repository at this point in the history
  • Loading branch information
newfish-cmyk authored Aug 29, 2024
1 parent 034108c commit a177a30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ const FieldEditModal = ({

if (isToolInput) {
data.toolDescription = data.description;
} else {
data.toolDescription = undefined;
}

data.label = data.key;
Expand Down

0 comments on commit a177a30

Please sign in to comment.