mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 10:05:59 +08:00
fix: when edit load balancing config not pass the empty filed value hidden (#8366)
This commit is contained in:
parent
24af4b9313
commit
5dfd7abb2b
@ -192,12 +192,12 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
|||||||
})
|
})
|
||||||
const getSecretValues = useCallback((v: FormValue) => {
|
const getSecretValues = useCallback((v: FormValue) => {
|
||||||
return secretFormSchemas.reduce((prev, next) => {
|
return secretFormSchemas.reduce((prev, next) => {
|
||||||
if (v[next.variable] === initialFormSchemasValue[next.variable])
|
if (isEditMode && v[next.variable] && v[next.variable] === initialFormSchemasValue[next.variable])
|
||||||
prev[next.variable] = '[__HIDDEN__]'
|
prev[next.variable] = '[__HIDDEN__]'
|
||||||
|
|
||||||
return prev
|
return prev
|
||||||
}, {} as Record<string, string>)
|
}, {} as Record<string, string>)
|
||||||
}, [initialFormSchemasValue, secretFormSchemas])
|
}, [initialFormSchemasValue, isEditMode, secretFormSchemas])
|
||||||
|
|
||||||
// const handleValueChange = ({ __model_type, __model_name, ...v }: FormValue) => {
|
// const handleValueChange = ({ __model_type, __model_name, ...v }: FormValue) => {
|
||||||
const handleValueChange = (v: FormValue) => {
|
const handleValueChange = (v: FormValue) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user