It turned out that after a failed submit the field value were reset in the react admin components internal state but not on the user-side. So empty data was submitted in those cases even thoug the DOMs values were not affected.
I couldn't exactly figure out what happened there so I gave up eventually and instead used an approach with react-hook-form directly (used by react admin under the hood) which explicitly resets and keeps the form values. Not quite as elegant but it works.
fixes https://github.com/activitypods/activitypods/issues/302
It turned out that after a failed submit the field value were reset in the react admin components internal state but not on the user-side. So empty data was submitted in those cases even thoug the DOMs values were not affected.
I couldn't exactly figure out what happened there so I gave up eventually and instead used an approach with
react-hook-form
directly (used by react admin under the hood) which explicitly resets and keeps the form values. Not quite as elegant but it works.