Skip to content

Commit 065e193

Browse files
authored
Fix/forms phone controls error (#45659)
* fix issue with react key prop on field controls * changelog * use key prop on parent container
1 parent c549f00 commit 065e193

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Forms: fix an error on phone field controls due to lack of key prop

projects/packages/forms/src/blocks/field-telephone/edit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export default function PhoneFieldEdit( props ) {
145145
{
146146
index: 1,
147147
element: (
148-
<>
148+
<div key="phoneFieldControls">
149149
<ToggleControl
150150
label={ __( 'Show country selector', 'jetpack-forms' ) }
151151
checked={ showCountrySelector || false }
@@ -162,7 +162,7 @@ export default function PhoneFieldEdit( props ) {
162162
__next40pxDefaultSize={ true }
163163
/>
164164
) }
165-
</>
165+
</div>
166166
),
167167
},
168168
] }

0 commit comments

Comments
 (0)