Skip to content

Commit dcd09a2

Browse files
Fix key prop spread error (#999)
1 parent a2d74b8 commit dcd09a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/routes/users+/$username_+/__note-editor.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ function ImageChooser({
225225
</div>
226226
)}
227227
{existingImage ? (
228-
<input {...getInputProps(fields.id, { type: 'hidden' })} />
228+
<input
229+
{...getInputProps(fields.id, { type: 'hidden' })}
230+
key={fields.id.key}
231+
/>
229232
) : null}
230233
<input
231234
aria-label="Image"
@@ -245,6 +248,7 @@ function ImageChooser({
245248
}}
246249
accept="image/*"
247250
{...getInputProps(fields.file, { type: 'file' })}
251+
key={fields.file.key}
248252
/>
249253
</label>
250254
</div>
@@ -257,6 +261,7 @@ function ImageChooser({
257261
<Textarea
258262
onChange={(e) => setAltText(e.currentTarget.value)}
259263
{...getTextareaProps(fields.altText)}
264+
key={fields.altText.key}
260265
/>
261266
<div className="min-h-[32px] px-4 pt-1 pb-3">
262267
<ErrorList

0 commit comments

Comments
 (0)