Skip to content

Commit

Permalink
Fix submit on enter
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed Mar 22, 2024
1 parent efb0f6e commit 77e3c49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/project_time.($id).tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function ProjectTimeForm({

function saveForm() {
if (!formRef.current) return;
const method = isCreate ? "PUT" : "POST";
const method = isCreate ? "POST" : "PUT";
const formData = new FormData(formRef.current);
formData.append("_action", method);
fetcher.submit(formData, {
Expand Down

0 comments on commit 77e3c49

Please sign in to comment.