File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export function createFieldFactory<CustomOptions extends {} = {}>(
6262 return {
6363 hidden : options ?. list ?. hidden ?? false ,
6464 columnProps : {
65+ key : options ?. key ,
6566 dataIndex : source ,
6667 sorter : options ?. list ?. sort ?? false ,
6768 sortDirections : [ 'ascend' , 'descend' ] ,
@@ -89,6 +90,7 @@ export function createFieldFactory<CustomOptions extends {} = {}>(
8990 }
9091
9192 return {
93+ key : options ?. key ,
9294 source,
9395 title : options ?. label ?? createElement ( FieldTitle , { source } ) ,
9496 hidden : editOptions . hidden ?? false ,
@@ -104,6 +106,7 @@ export function createFieldFactory<CustomOptions extends {} = {}>(
104106 } as EditFieldItem ;
105107 } else if ( viewType === 'detail' ) {
106108 return {
109+ key : options ?. key ,
107110 source,
108111 title : options ?. label ?? createElement ( FieldTitle , { source } ) ,
109112 hidden : options ?. detail ?. hidden ?? false ,
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ export interface BasicFieldEditOptions {
1212}
1313
1414export interface BasicFieldOptions {
15+ key ?: string ;
16+
1517 label ?: string ;
1618
1719 /**
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export const TushanBreadcrumb: React.FC = React.memo(() => {
3535
3636 return (
3737 < Breadcrumb style = { { marginBottom : 16 } } >
38- < Breadcrumb . Item >
38+ < Breadcrumb . Item key = "dashboard" >
3939 { dashboard !== false ? (
4040 < NavLink to = "/dashboard" key = "home-dashboard" >
4141 < IconHome className = "mr-2" style = { { marginRight : 2 } } />
@@ -51,7 +51,7 @@ export const TushanBreadcrumb: React.FC = React.memo(() => {
5151 ) }
5252 </ Breadcrumb . Item >
5353
54- { title && < Breadcrumb . Item > { title } </ Breadcrumb . Item > }
54+ { title && < Breadcrumb . Item key = "title" > { title } </ Breadcrumb . Item > }
5555 </ Breadcrumb >
5656 ) ;
5757} ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " tushan" ,
3- "version" : " 0.3.24 " ,
3+ "version" : " 0.3.26 " ,
44 "description" : " " ,
55 "main" : " ./index.ts" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments