From 0ad58de16f5523aaadbf40c5abfb49909882990d Mon Sep 17 00:00:00 2001 From: Siva Addanki <34810623+avsssai@users.noreply.github.com> Date: Fri, 6 Sep 2024 17:48:58 +0530 Subject: [PATCH] Update components.tsx for all cases Currently the name of the input has to be "name" for the optimistic updates to work. Sticking to component style of react, made it so that it works for all fieldNames --- app/routes/board.$id/components.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/board.$id/components.tsx b/app/routes/board.$id/components.tsx index f13bd9b..60740cc 100644 --- a/app/routes/board.$id/components.tsx +++ b/app/routes/board.$id/components.tsx @@ -59,7 +59,7 @@ export function EditableText({ // optimistic update if (fetcher.formData?.has(fieldName)) { - value = String(fetcher.formData.get("name")); + value = String(fetcher.formData.get(fieldName)); } return edit ? (