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
-
Versions:
@inertiajs/react
version: 1.0.15laravel/framework
version : 10.46.0react
version : 18.2.0@vitejs/plugin-react
version : 4.2.1laravel-vite-plugin
version : 1.0.2vite
version : 5.1.6Describe the problem:
For a Searchbar component I make a form with many fields but when I submit it (using
form.get
)isDirty
keep at true ifpreserveState
is 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