File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/keystatic/src/form/fields/array Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @keystatic/core ' : patch
3+ ---
4+
5+ Fix warning from React about spreading ` key ` onto props when editing item in
6+ array field
Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ function ArrayEditItemModalContent(props: {
257257 return { slugs, field : slugField , glob : '*' as const } ;
258258 } , [ props . previewProps , props . modalStateIndex ] ) ;
259259
260+ const { key, ...propsWithoutKey } =
261+ props . previewProps . elements [ props . modalStateIndex ] ;
262+
260263 return (
261264 < Content >
262265 < VStack
@@ -272,7 +275,7 @@ function ArrayEditItemModalContent(props: {
272275 < FormValueContentFromPreviewProps
273276 slugField = { slugInfo }
274277 autoFocus
275- { ...props . previewProps . elements [ props . modalStateIndex ] }
278+ { ...propsWithoutKey }
276279 />
277280 </ VStack >
278281 </ Content >
You can’t perform that action at this time.
0 commit comments