Skip to content

Commit

Permalink
Rename fields to children for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
louwie17 committed Nov 5, 2024
1 parent 8c15a9b commit 8ea852c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const CombinedFieldsComponent = ( {
{
id: 'status',
layout: 'panel',
fields: [ 'status', 'password' ],
children: [ 'status', 'password' ],
},
] ),
'order',
Expand Down
4 changes: 2 additions & 2 deletions packages/dataviews/src/dataforms-layouts/panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export default function FormPanelField< Item >( {
if (
typeof field !== 'string' &&
field.layout === 'panel' &&
field.fields
field.children
) {
return field.fields;
return field.children;
}
return [ field ];
}, [ field ] );
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export interface RegularFieldLayout extends BaseFieldLayout {

export interface PanelFieldLayout extends BaseFieldLayout {
layout: 'panel';
fields?: FormField[];
children?: FormField[];
}

export interface InlineFieldLayout extends BaseFieldLayout {
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/post-edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function PostEditForm( { postType, postId } ) {
id: 'status',
label: __( 'Status & Visibility' ),
layout: 'panel',
fields: [ 'status', 'password' ],
children: [ 'status', 'password' ],
},
'author',
'date',
Expand Down

0 comments on commit 8ea852c

Please sign in to comment.