mirror of https://github.com/langgenius/dify.git
fix: conditionally render FieldListContainer based on inputFields length
This commit is contained in:
parent
70119a054a
commit
377093b776
|
|
@ -45,14 +45,16 @@ const FieldList = ({
|
|||
<RiAddLine className='h-4 w-4 text-text-tertiary' />
|
||||
</ActionButton>
|
||||
</div>
|
||||
<FieldListContainer
|
||||
className='flex flex-col gap-y-1 px-4 pb-2'
|
||||
inputFields={inputFields}
|
||||
onEditField={handleOpenInputFieldEditor}
|
||||
onRemoveField={handleRemoveField}
|
||||
onListSortChange={handleListSortChange}
|
||||
readonly={readonly}
|
||||
/>
|
||||
{inputFields.length > 0 && (
|
||||
<FieldListContainer
|
||||
className='flex flex-col gap-y-1 px-4 pb-2'
|
||||
inputFields={inputFields}
|
||||
onEditField={handleOpenInputFieldEditor}
|
||||
onRemoveField={handleRemoveField}
|
||||
onListSortChange={handleListSortChange}
|
||||
readonly={readonly}
|
||||
/>
|
||||
)}
|
||||
{showInputFieldEditor && (
|
||||
<InputFieldEditor
|
||||
show={showInputFieldEditor}
|
||||
|
|
|
|||
Loading…
Reference in New Issue