Open felldiddy opened 2 months ago
It would be very useful to use the onEdit handler to prevent a value from being updated, for instance:
onEdit
<JsonView src={data} editable={{ edit: true }} onEdit={({ newValue }) => newValue === "something bad" ? false : true} />
In particular, this would support behavior where I don't want to allow a field that's a number to be changed to a string, or vice-versa (for one use case) by comparing the type of the old value to the type of the new value.
It would be very useful to use the
onEdit
handler to prevent a value from being updated, for instance:In particular, this would support behavior where I don't want to allow a field that's a number to be changed to a string, or vice-versa (for one use case) by comparing the type of the old value to the type of the new value.