IsDirty keep at true after form submit #1829
Unanswered
Oui-Dev
asked this question in
Help (React)
Replies: 2 comments 1 reply
-
|
Same issue here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@Oui-Dev and @fnagel you can fix that calling const handleSave = (e) => {
e.preventDefault();
patch("/settings/profile", {
onSuccess: () => {
toast.success("Dados atualizados com sucesso");
},
onError: () => {
toast.error("Erro ao atualizar dados");
},
onFinish: () => {
setDefaults();
},
});
}; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Versions:
@inertiajs/reactversion: 1.0.15laravel/frameworkversion : 10.46.0reactversion : 18.2.0@vitejs/plugin-reactversion : 4.2.1laravel-vite-pluginversion : 1.0.2viteversion : 5.1.6Describe the problem:
For a Searchbar component I make a form with many fields but when I submit it (using
form.get)isDirtykeep at true ifpreserveStateis set to true. I don't know if I make something wrong with my default values or with the debounce.I saw someone with a similar issue here #1033 but I don't understand how he solve it.
Code
Beta Was this translation helpful? Give feedback.
All reactions