I have this data:
...
initialValues: {
alarm: 'normal',
days: { mon: true, tue: true, wed: true, thu: false, friday: true }
}
...
to render, I do the following.
<Field name="days" component={({ input }) => {
return (
<div className='days-container'>
<Checkbox label='Monday' checked={input.value.mon} onChange={input.onChange} />
<Checkbox label='Tuesday' checked={input.value.tue} onChange={input.onChange} />
...
</div>
)
}}/>
but days value becomes Boolean:
days: true
as you would to maintain the initial structure?