mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 11:58:38 +00:00
fix: plugin input (#2567)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user