mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00
fix: plugin input (#2567)
This commit is contained in:
@@ -58,7 +58,7 @@ const RenderInput = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isEqual(getValues(), defaultFormValues)) return;
|
if (isEqual(getValues(), defaultFormValues)) return;
|
||||||
reset(historyFormValues || defaultFormValues);
|
reset(historyFormValues || defaultFormValues);
|
||||||
}, [defaultFormValues, historyFormValues]);
|
}, [defaultFormValues, getValues, historyFormValues, reset]);
|
||||||
|
|
||||||
const isDisabledInput = histories.length > 0;
|
const isDisabledInput = histories.length > 0;
|
||||||
|
|
||||||
@@ -72,6 +72,7 @@ const RenderInput = () => {
|
|||||||
name={input.key}
|
name={input.key}
|
||||||
rules={{
|
rules={{
|
||||||
validate: (value) => {
|
validate: (value) => {
|
||||||
|
if (!input.required) return true;
|
||||||
if (input.valueType === WorkflowIOValueTypeEnum.boolean) {
|
if (input.valueType === WorkflowIOValueTypeEnum.boolean) {
|
||||||
return value !== undefined;
|
return value !== undefined;
|
||||||
}
|
}
|
||||||
|
@@ -199,6 +199,8 @@ const FieldEditModal = ({
|
|||||||
|
|
||||||
if (isToolInput) {
|
if (isToolInput) {
|
||||||
data.toolDescription = data.description;
|
data.toolDescription = data.description;
|
||||||
|
} else {
|
||||||
|
data.toolDescription = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.label = data.key;
|
data.label = data.key;
|
||||||
|
Reference in New Issue
Block a user