File tree 3 files changed +173
-147
lines changed
3 files changed +173
-147
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export const CippFormComponent = (props) => {
43
43
name, // The name that may have bracket notation
44
44
label,
45
45
labelLocation = "behind" , // Default location for switches
46
+ defaultValue,
46
47
...other
47
48
} = props ;
48
49
const { errors } = useFormState ( { control : formControl . control } ) ;
@@ -121,6 +122,7 @@ export const CippFormComponent = (props) => {
121
122
{ ...other }
122
123
{ ...formControl . register ( convertedName , { ...validators } ) }
123
124
label = { label }
125
+ defaultValue = { defaultValue }
124
126
/>
125
127
</ div >
126
128
< Typography variant = "subtitle3" color = "error" >
@@ -156,6 +158,7 @@ export const CippFormComponent = (props) => {
156
158
{ ...other }
157
159
{ ...formControl . register ( convertedName , { ...validators } ) }
158
160
label = { label }
161
+ defaultValue = { defaultValue }
159
162
/>
160
163
</ div >
161
164
< Typography variant = "subtitle3" color = "error" >
@@ -171,6 +174,7 @@ export const CippFormComponent = (props) => {
171
174
< Controller
172
175
name = { convertedName }
173
176
control = { formControl . control }
177
+ defaultValue = { defaultValue }
174
178
render = { ( { field } ) =>
175
179
renderSwitchWithLabel (
176
180
< Switch
Original file line number Diff line number Diff line change @@ -292,18 +292,18 @@ export const CippWizardOffboarding = (props) => {
292
292
< Grid item xs = { 12 } sm = { 6 } >
293
293
< Typography variant = "subtitle2" > Send results to:</ Typography >
294
294
< CippFormComponent
295
- name = "webhook"
295
+ name = "postExecution. webhook"
296
296
label = "Webhook"
297
297
type = "switch"
298
298
formControl = { formControl }
299
299
/>
300
300
< CippFormComponent
301
- name = "email"
301
+ name = "postExecution. email"
302
302
label = "E-mail"
303
303
type = "switch"
304
304
formControl = { formControl }
305
305
/>
306
- < CippFormComponent name = "psa" label = "PSA" type = "switch" formControl = { formControl } />
306
+ < CippFormComponent name = "postExecution. psa" label = "PSA" type = "switch" formControl = { formControl } />
307
307
</ Grid >
308
308
</ CippFormCondition >
309
309
</ Grid >
You can’t perform that action at this time.
0 commit comments