I have an array of checkbox rendered as:
<form>
{items.map(item => {
<Field component="input"
type="checkbox"
name=`items.{item.id}`
})}
</form>
This gives me values as an Array:
{
//index: 0, 1, ,…, 120, 121, … ,231, …
item: [undefinded,undefined,…,true,undefined,…,true,undefined,…]
}
Instead I would prefer an Object, (mainly to avoid a large array being created):
{
120: true,
131: true,
165: false
}
Is there a way to force redux-form output object when itemId is integer.
Note: If itemId is passed as string then redux-form does return an Array.
Similar post but solution does not work with redux-form 7.