Commit a982dedf authored by neoscript99's avatar neoscript99 Committed by ddcat1115

StandardTable need a "rowKey" prop (#1175)

* StandardTable.rowKey

* eslint no-unneeded-ternary
parent 52772aec
...@@ -63,7 +63,7 @@ class StandardTable extends PureComponent { ...@@ -63,7 +63,7 @@ class StandardTable extends PureComponent {
render() { render() {
const { selectedRowKeys, needTotalList } = this.state; const { selectedRowKeys, needTotalList } = this.state;
const { data: { list, pagination }, loading, columns } = this.props; const { data: { list, pagination }, loading, columns, rowKey } = this.props;
const paginationProps = { const paginationProps = {
showSizeChanger: true, showSizeChanger: true,
...@@ -105,7 +105,7 @@ class StandardTable extends PureComponent { ...@@ -105,7 +105,7 @@ class StandardTable extends PureComponent {
</div> </div>
<Table <Table
loading={loading} loading={loading}
rowKey={record => record.key} rowKey={rowKey || 'key'}
rowSelection={rowSelection} rowSelection={rowSelection}
dataSource={list} dataSource={list}
columns={columns} columns={columns}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment