File tree Expand file tree Collapse file tree 1 file changed +43
-20
lines changed Expand file tree Collapse file tree 1 file changed +43
-20
lines changed Original file line number Diff line number Diff line change @@ -165,26 +165,49 @@ const withCustomControls = createHigherOrderComponent( ( BlockEdit ) => {
165
165
initialOpen = { true }
166
166
>
167
167
{ bindableAttributes . map ( ( attribute ) => (
168
- < PanelRow key = { `scf-field-${ attribute } ` } >
169
- < ComboboxControl
170
- __next40pxDefaultSize
171
- __nextHasNoMarginBottom
172
- __experimentalShowHowTo = { false }
173
- __experimentalExpandOnFocus = { true }
174
- __experimentalAutoSelectFirstMatch = { true }
175
- label = { attribute }
176
- placeholder = { __ (
177
- 'Select a field' ,
178
- 'secure-custom-fields'
179
- ) }
180
- options = { fieldsSuggestions }
181
- value = { boundFields [ attribute ] || '' }
182
- onChange = { ( value ) =>
183
- handleFieldChange ( attribute , value )
184
- }
185
- key = { `scf-field-${ attribute } ` }
186
- />
187
- </ PanelRow >
168
+ < >
169
+ < PanelRow key = { `scf-field-${ attribute } ` } >
170
+ < ComboboxControl
171
+ __next40pxDefaultSize
172
+ __nextHasNoMarginBottom
173
+ __experimentalShowHowTo = { false }
174
+ __experimentalExpandOnFocus = { true }
175
+ __experimentalAutoSelectFirstMatch = {
176
+ true
177
+ }
178
+ label = { attribute }
179
+ placeholder = { __ (
180
+ 'Select a field' ,
181
+ 'secure-custom-fields'
182
+ ) }
183
+ options = { fieldsSuggestions }
184
+ value = { boundFields [ attribute ] || '' }
185
+ onChange = { ( value ) =>
186
+ handleFieldChange (
187
+ attribute ,
188
+ value
189
+ )
190
+ }
191
+ key = { `scf-field-${ attribute } ` }
192
+ />
193
+ </ PanelRow >
194
+ { boundFields [ attribute ] && (
195
+ < PanelRow >
196
+ < Button
197
+ onClick = { ( ) => {
198
+ console . log ( 'edit' ) ;
199
+ } }
200
+ __next40pxDefaultSize
201
+ variant = "secondary"
202
+ >
203
+ { __ (
204
+ 'Edit field' ,
205
+ 'secure-custom-fields'
206
+ ) }
207
+ </ Button >
208
+ </ PanelRow >
209
+ ) }
210
+ </ >
188
211
) ) }
189
212
< PanelRow >
190
213
< Button
You can’t perform that action at this time.
0 commit comments