fix: conditionally render FieldListContainer based on inputFields length

pull/21398/head
twwu 12 months ago
parent 70119a054a
commit 377093b776

@ -45,14 +45,16 @@ const FieldList = ({
<RiAddLine className='h-4 w-4 text-text-tertiary' /> <RiAddLine className='h-4 w-4 text-text-tertiary' />
</ActionButton> </ActionButton>
</div> </div>
<FieldListContainer {inputFields.length > 0 && (
className='flex flex-col gap-y-1 px-4 pb-2' <FieldListContainer
inputFields={inputFields} className='flex flex-col gap-y-1 px-4 pb-2'
onEditField={handleOpenInputFieldEditor} inputFields={inputFields}
onRemoveField={handleRemoveField} onEditField={handleOpenInputFieldEditor}
onListSortChange={handleListSortChange} onRemoveField={handleRemoveField}
readonly={readonly} onListSortChange={handleListSortChange}
/> readonly={readonly}
/>
)}
{showInputFieldEditor && ( {showInputFieldEditor && (
<InputFieldEditor <InputFieldEditor
show={showInputFieldEditor} show={showInputFieldEditor}

Loading…
Cancel
Save