File tree Expand file tree Collapse file tree 1 file changed +29
-27
lines changed
packages/gamut/src/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes Expand file tree Collapse file tree 1 file changed +29
-27
lines changed Original file line number Diff line number Diff line change @@ -61,33 +61,35 @@ export const ConnectedNestedCheckboxes: React.FC<
6161 < Controller
6262 control = { control }
6363 name = { name }
64- render = { ( { field : { value = [ ] , onChange, onBlur, ref } } ) => (
65- < Box as = "ul" m = { 0 } p = { 0 } >
66- { flatOptions . map ( ( option ) => {
67- const states = calculateStates ( value , flatOptions ) ;
68- const state = states . get ( option . value ) ! ;
69- return renderCheckbox (
70- option ,
71- state ,
72- `${ name } -${ option . value } ` ,
73- isRequired ,
74- isDisabled ,
75- onBlur ,
76- ( event ) => {
77- handleCheckboxChange (
78- option ,
79- event . target . checked ,
80- value ,
81- flatOptions ,
82- onChange ,
83- onUpdate
84- ) ;
85- } ,
86- ref
87- ) ;
88- } ) }
89- </ Box >
90- ) }
64+ render = { ( { field : { value = [ ] , onChange, onBlur, ref } } ) => {
65+ const states = calculateStates ( value , flatOptions ) ;
66+ return (
67+ < Box as = "ul" m = { 0 } p = { 0 } >
68+ { flatOptions . map ( ( option ) => {
69+ const state = states . get ( option . value ) ! ;
70+ return renderCheckbox (
71+ option ,
72+ state ,
73+ `${ name } -${ option . value } ` ,
74+ isRequired ,
75+ isDisabled ,
76+ onBlur ,
77+ ( event ) => {
78+ handleCheckboxChange (
79+ option ,
80+ event . target . checked ,
81+ value ,
82+ flatOptions ,
83+ onChange ,
84+ onUpdate
85+ ) ;
86+ } ,
87+ ref
88+ ) ;
89+ } ) }
90+ </ Box >
91+ ) ;
92+ } }
9193 rules = { validation }
9294 />
9395 ) ;
You can’t perform that action at this time.
0 commit comments