File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
packages/keystatic/src/app Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @keystatic/core ' : patch
3+ ---
4+
5+ Fix entries with a slug of ` header ` breaking the collection table
Original file line number Diff line number Diff line change @@ -497,7 +497,13 @@ function CollectionTable(
497497 overflowMode = "truncate"
498498 prominence = "low"
499499 onAction = { key => {
500- router . push ( getItemPath ( props . basePath , props . collection , key ) ) ;
500+ router . push (
501+ getItemPath (
502+ props . basePath ,
503+ props . collection ,
504+ key . toString ( ) . slice ( 'key:' . length )
505+ )
506+ ) ;
501507 } }
502508 renderEmptyState = { ( ) => (
503509 < EmptyState
@@ -554,7 +560,7 @@ function CollectionTable(
554560 ) ;
555561 if ( collection . columns ?. length ) {
556562 return (
557- < Row key = { item . name } >
563+ < Row key = { 'key:' + item . name } >
558564 { [
559565 ...( hideStatusColumn ? [ ] : [ statusCell ] ) ,
560566 nameCell ,
@@ -578,9 +584,9 @@ function CollectionTable(
578584 ) ;
579585 }
580586 return hideStatusColumn ? (
581- < Row key = { item . name } > { nameCell } </ Row >
587+ < Row key = { 'key:' + item . name } > { nameCell } </ Row >
582588 ) : (
583- < Row key = { item . name } >
589+ < Row key = { 'key:' + item . name } >
584590 { statusCell }
585591 { nameCell }
586592 </ Row >
You can’t perform that action at this time.
0 commit comments