dify/web/app/components/workflow/nodes/human-input/use-form-content.ts
2025-08-07 18:28:17 +08:00

18 lines
456 B
TypeScript

import useNodeCrud from '../_base/hooks/use-node-crud'
import type { HumanInputNodeType } from './types'
const useFormContent = (id: string, payload: HumanInputNodeType) => {
const { inputs, setInputs } = useNodeCrud<HumanInputNodeType>(id, payload)
const handleFormContentChange = (value: string) => {
setInputs({
...inputs,
form_content: value,
})
}
return {
handleFormContentChange,
}
}
export default useFormContent