I noticed that it is required to pass an object with the correct structure to the resetDirty function of the form instance for it to work.. I wondered why that is and if it is not easier to also allow "brute" resetting everything with just resetDirty().
In my case I want to set the form values after getting a response from a request but there are properties that are not part of the response since they are optional.
I could adjust the backend to send more predictable payloads by just adding all properties and set them to null but I think it would help me to better understand how the dirty state of the form works and why the properties are necessary..
If I wanted to solve this client side only I would have to do it like so:
form.resetDirty({ ...data, logChannelId: "" });
Since the logChannelId ist not part of data but part of my initialValues in the form.