@@ -123,7 +123,9 @@ export const RFFCFormSwitch = ({
123
123
>
124
124
< div className = { className } >
125
125
< CFormSwitch
126
- { ...input }
126
+ onChange = { input . onChange }
127
+ checked = { input . checked }
128
+ value = { input . value }
127
129
// @todo revisit this, only shows green when checked
128
130
valid = { ! meta . error && meta . touched && validate }
129
131
invalid = { meta . error && meta . touched && validate }
@@ -265,7 +267,9 @@ export const RFFCFormRadio = ({
265
267
{ ( { meta, input } ) => (
266
268
< div className = { className } >
267
269
< CFormCheck
268
- { ...input }
270
+ onChange = { input . onChange }
271
+ checked = { input . checked }
272
+ value = { input . value }
269
273
valid = { ! meta . error && meta . touched }
270
274
invalid = { meta . error && meta . touched }
271
275
disabled = { disabled }
@@ -285,6 +289,49 @@ RFFCFormRadio.propTypes = {
285
289
...sharedPropTypes ,
286
290
}
287
291
292
+ export const RFFCFormRadioList = ( {
293
+ name,
294
+ options,
295
+ className = 'mb-3' ,
296
+ disabled = false ,
297
+ onClick,
298
+ inline = false ,
299
+ } ) => {
300
+ return (
301
+ < >
302
+ < div className = { className } >
303
+ { options ?. map ( ( option , key ) => {
304
+ return (
305
+ < Field name = { name } type = "radio" value = { option . value } key = { key } >
306
+ { ( { input } ) => {
307
+ return (
308
+ < >
309
+ < CFormCheck
310
+ name = { input . name }
311
+ checked = { input . checked }
312
+ onChange = { input . onChange }
313
+ type = "radio"
314
+ { ...option }
315
+ disabled = { disabled }
316
+ onClick = { onClick }
317
+ inline = { inline }
318
+ />
319
+ </ >
320
+ )
321
+ } }
322
+ </ Field >
323
+ )
324
+ } ) }
325
+ </ div >
326
+ </ >
327
+ )
328
+ }
329
+
330
+ RFFCFormRadioList . propTypes = {
331
+ ...sharedPropTypes ,
332
+ inline : PropTypes . bool ,
333
+ }
334
+
288
335
export const RFFCFormTextarea = ( {
289
336
name,
290
337
label,
0 commit comments