1

AgGrid by default modifies underlying row data when inline editing is done.

This breaks "immutability rules", as my model is stored in redux. As I'm using immer , I am also getting

Cannot assign to read only property 'version' of object '#'

How can I prevent AgGrid from automatically submitting values to the model. I want to manually dispatch an action to the store that will make the changes.

dragonfly
  • 17,407
  • 30
  • 110
  • 219

1 Answers1

2

The solution is to add a "valueSetter" property to the grid column's definition. The value of this property should be a function that will receive the new value, and then use that new value to update the store.

Original answer: AG-Grid: Cannot update field in Grid as it is read only

daemon
  • 372
  • 1
  • 4
  • 24