feat: support chatflow start node custom input field hidden (#19678)
This commit is contained in:
@@ -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'
|
||||
|
Reference in New Issue
Block a user