@@ -4,11 +4,11 @@ import RenderFields from '../../RenderFields';
44import withCondition from '../../withCondition' ;
55import FieldDescription from '../../FieldDescription' ;
66import { Props } from './types' ;
7- import { fieldAffectsData } from '../../../../../fields/config/types' ;
87import { useCollapsible } from '../../../elements/Collapsible/provider' ;
98import { GroupProvider , useGroup } from './provider' ;
109import { useTabs } from '../Tabs/provider' ;
1110import { getTranslation } from '../../../../../utilities/getTranslation' ;
11+ import { createNestedFieldPath } from '../../Form/createNestedFieldPath' ;
1212
1313import './index.scss' ;
1414
@@ -60,16 +60,16 @@ const Group: React.FC<Props> = (props) => {
6060 < GroupProvider >
6161 < div className = { `${ baseClass } __wrap` } >
6262 { ( label || description ) && (
63- < header className = { `${ baseClass } __header` } >
64- { label && (
65- < h3 className = { `${ baseClass } __title` } > { getTranslation ( label , i18n ) } </ h3 >
66- ) }
67- < FieldDescription
68- className = { `field-description-${ path . replace ( / \. / gi, '__' ) } ` }
69- value = { null }
70- description = { description }
71- />
72- </ header >
63+ < header className = { `${ baseClass } __header` } >
64+ { label && (
65+ < h3 className = { `${ baseClass } __title` } > { getTranslation ( label , i18n ) } </ h3 >
66+ ) }
67+ < FieldDescription
68+ className = { `field-description-${ path . replace ( / \. / gi, '__' ) } ` }
69+ value = { null }
70+ description = { description }
71+ />
72+ </ header >
7373 ) }
7474 < RenderFields
7575 permissions = { permissions ?. fields }
@@ -78,7 +78,7 @@ const Group: React.FC<Props> = (props) => {
7878 indexPath = { indexPath }
7979 fieldSchema = { fields . map ( ( subField ) => ( {
8080 ...subField ,
81- path : ` ${ path } ${ fieldAffectsData ( subField ) ? `. ${ subField . name } ` : '' } ` ,
81+ path : createNestedFieldPath ( path , subField ) ,
8282 } ) ) }
8383 />
8484 </ div >
0 commit comments