You can use Inertia's onFinish Global event to set it.
Jan 6, 2022
3
Level 102
Set isDirty with preserveState (inertia-react)
I have a list of input fields that is used to filter the page. The form is submitted on each onBlur() event.
The problem is that I want to retain input focus after submit. Therefor I set preseveState to true, to retain focus. But this means that isDirty will remail true
Is the some clever way to manually set isDirty?
I have tested with reset() after successfully submitting but that just resets the form to how it looked before submit
Level 102
I found out the errror. It was because laravel was returning the set ID's as strings..
Fixed by casting all values to integers in the response from laravel
Please or to participate in this conversation.