mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 11:25:55 +08:00
fix parameter description data binding
This commit is contained in:
parent
911af03e0c
commit
dded6001e2
@ -115,6 +115,7 @@ const MCPServerModal = ({
|
|||||||
<MCPServerParamItem
|
<MCPServerParamItem
|
||||||
key={paramItem.variable}
|
key={paramItem.variable}
|
||||||
data={paramItem}
|
data={paramItem}
|
||||||
|
value={params[paramItem.variable] || ''}
|
||||||
onChange={value => handleParamChange(paramItem.variable, value)}
|
onChange={value => handleParamChange(paramItem.variable, value)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
@ -5,11 +5,13 @@ import Textarea from '@/app/components/base/textarea'
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
data?: any
|
data?: any
|
||||||
|
value: string
|
||||||
onChange: (value: string) => void
|
onChange: (value: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const MCPServerParamItem = ({
|
const MCPServerParamItem = ({
|
||||||
data,
|
data,
|
||||||
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@ -24,7 +26,7 @@ const MCPServerParamItem = ({
|
|||||||
</div>
|
</div>
|
||||||
<Textarea
|
<Textarea
|
||||||
className='h-8 resize-none'
|
className='h-8 resize-none'
|
||||||
value={data.value}
|
value={value}
|
||||||
placeholder={t('tools.mcp.server.modal.parametersPlaceholder')}
|
placeholder={t('tools.mcp.server.modal.parametersPlaceholder')}
|
||||||
onChange={e => onChange(e.target.value)}
|
onChange={e => onChange(e.target.value)}
|
||||||
></Textarea>
|
></Textarea>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user