From cc20f20fe3b82f046833e9cf6d1d2e3220e754cc Mon Sep 17 00:00:00 2001 From: metatroncubeswdev Date: Tue, 25 Aug 2026 02:23:22 -0400 Subject: [PATCH] fix: uncontrolled Polaris TextFields couldn't be typed into MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit app.locations.new.tsx's "Location name"/"Address" fields and app.blackouts._index.tsx's "Date"/"Reason" fields were missing value/onChange — Polaris TextField is fully controlled, so without that wiring every keystroke gets overwritten back to an empty string on re-render, making the field appear frozen. Every other form in the app already followed the value/onChange + useState pattern; these four fields were the only ones missed, and went uncaught until live browser testing was actually possible tonight (shopify.web.toml was missing until now). Co-Authored-By: Claude Sonnet 5 --- app/routes/app.blackouts._index.tsx | 7 +++++-- app/routes/app.locations.new.tsx | 13 ++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/routes/app.blackouts._index.tsx b/app/routes/app.blackouts._index.tsx index ce55f5c..4c9ea9d 100644 --- a/app/routes/app.blackouts._index.tsx +++ b/app/routes/app.blackouts._index.tsx @@ -1,3 +1,4 @@ +import { useState } from "react"; import { data, type ActionFunctionArgs, type LoaderFunctionArgs } from "@remix-run/node"; import { Form, useLoaderData, useNavigation } from "@remix-run/react"; import { @@ -71,6 +72,8 @@ export default function BlackoutsIndex() { const { locations, blackouts } = useLoaderData(); const navigation = useNavigation(); const isSubmitting = navigation.state === "submitting"; + const [date, setDate] = useState(""); + const [reason, setReason] = useState(""); if (locations.length === 0) { return ( @@ -140,7 +143,7 @@ export default function BlackoutsIndex() { Add a blackout date - +