fix: rpc server field error

This commit is contained in:
jialin
2024-09-12 19:18:40 +08:00
parent f339133245
commit e1ada8f53d
4 changed files with 31 additions and 22 deletions
+7 -2
View File
@@ -10,9 +10,10 @@ interface SimpleTableProps {
columns: any[];
dataSource: any[];
bordered?: boolean;
rowKey?: string;
}
const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
const { columns, dataSource, bordered = true } = props;
const { columns, dataSource, rowKey, bordered = true } = props;
return (
<SimpleBar style={{ maxHeight: 200 }}>
<table
@@ -26,7 +27,11 @@ const SimpleTabel: React.FC<SimpleTableProps> = (props) => {
<tbody>
{dataSource.map((item: any, index: number) => {
return (
<TableRow row={item} columns={columns} key="index"></TableRow>
<TableRow
row={item}
columns={columns}
key={rowKey ? item[rowKey] : index}
></TableRow>
);
})}
</tbody>