feat: support chatflow start node custom input field hidden (#19678)

This commit is contained in:
Panpan
2025-05-21 13:52:21 +08:00
committed by GitHub
parent 627911d4ff
commit ef3569e667
19 changed files with 76 additions and 18 deletions

View File

@@ -17,6 +17,7 @@ const UserInput = () => {
const nodes = useNodes<StartNodeType>()
const startNode = nodes.find(node => node.data.type === BlockEnum.Start)
const variables = startNode?.data.variables || []
const visibleVariables = variables.filter(v => v.hide !== true)
const handleValueChange = (variable: string, v: string) => {
const {
@@ -29,13 +30,13 @@ const UserInput = () => {
})
}
if (!variables.length)
if (!visibleVariables.length)
return null
return (
<div className={cn('sticky top-0 z-[1] rounded-xl border-[0.5px] border-components-panel-border-subtle bg-components-panel-on-panel-item-bg shadow-xs')}>
<div className='px-4 pb-4 pt-3'>
{variables.map((variable, index) => (
{visibleVariables.map((variable, index) => (
<div
key={variable.variable}
className='mb-4 last-of-type:mb-0'