react-final-form-arrays
react-final-form-arrays copied to clipboard
Question : How update a line
Is there a way to update the value of a line ?
Now I'm using :
let guestCopy = fields.value[index];
guestCopy.bookingOwner = true;
fields.remove(index);
fields.insert(index, guestCopy);
But it's a little bit dirty
@xero88 #63 is basically documenting the already existing function called update
it allows you to update the field in a clean way, just like you wish for 😄
so to implement your booking code, just do:
fields.update(index,guestCopy)