From 54fac4a5d793b534e25600d2f9470c449f40df1d Mon Sep 17 00:00:00 2001 From: Dennis Snijder Date: Mon, 8 May 2023 21:55:12 +0200 Subject: [PATCH] fix: Row groups in tabs vertical alignment (#2593) * fix: removes top padding from group in row --------- Co-authored-by: PatrikKozak --- .../forms/field-types/Group/index.scss | 4 ++ test/fields/collections/Group/index.ts | 55 +++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/src/admin/components/forms/field-types/Group/index.scss b/src/admin/components/forms/field-types/Group/index.scss index 5e975b31b7..8191687865 100644 --- a/src/admin/components/forms/field-types/Group/index.scss +++ b/src/admin/components/forms/field-types/Group/index.scss @@ -91,3 +91,7 @@ .group-field--within-row+.group-field--within-row { margin-top: 0; } + +.group-field--within-tab+.group-field--within-row { + padding-top: 0; +} diff --git a/test/fields/collections/Group/index.ts b/test/fields/collections/Group/index.ts index 617838f93a..b038761cab 100644 --- a/test/fields/collections/Group/index.ts +++ b/test/fields/collections/Group/index.ts @@ -110,6 +110,61 @@ const GroupFields: CollectionConfig = { }, ], }, + + { + type: 'tabs', + tabs: [ + { + name: 'groups', + label: 'Groups in tabs', + fields: [ + { + type: 'row', + fields: [ + { + name: 'groupInRow', + type: 'group', + fields: [ + { + name: 'field', + type: 'text', + }, + { + name: 'secondField', + type: 'text', + }, + { + name: 'thirdField', + type: 'text', + }, + ], + }, + { + name: 'secondGroupInRow', + type: 'group', + fields: [ + { + name: 'field', + type: 'text', + }, + { + name: 'nestedGroup', + type: 'group', + fields: [ + { + name: 'nestedField', + type: 'text', + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + }, ], };