fix(ui): removes duplicative hidden field from array rows

This commit is contained in:
Jacob Fletcher
2024-03-19 16:29:37 -04:00
parent bee32f9898
commit d473600a15
2 changed files with 3 additions and 4 deletions

View File

@@ -135,8 +135,9 @@ export const DefaultEditView: React.FC = () => {
reportUpdate,
id,
entitySlug,
collectionSlug,
user,
collectionSlug,
userSlug,
getVersions,
getDocPermissions,
isEditing,

View File

@@ -1,5 +1,5 @@
import type { FieldPermissions } from 'payload/auth'
import type { ArrayField, Row, RowLabel as RowLabelType } from 'payload/types'
import type { ArrayField, Row } from 'payload/types'
import { getTranslation } from '@payloadcms/translations'
import React from 'react'
@@ -14,7 +14,6 @@ import { useTranslation } from '../../../providers/Translation/index.js'
import { useFormSubmitted } from '../../Form/context.js'
import { RenderFields } from '../../RenderFields/index.js'
import { RowLabel } from '../../RowLabel/index.js'
import HiddenInput from '../HiddenInput/index.js'
import './index.scss'
const baseClass = 'array-field'
@@ -125,7 +124,6 @@ export const ArrayRow: React.FC<ArrayRowProps> = ({
}
onToggle={(collapsed) => setCollapse(row.id, collapsed)}
>
<HiddenInput name={`${path}.id`} value={row.id} />
<RenderFields
className={`${baseClass}__fields`}
fieldMap={fieldMap}