我需要一些幫助。React antd表expandedRowRender
我在我的React.Component中的antd表上有一個數據源。在該表上,我已經設置了屬性expandedRowRender:
<Table
bordered
size="small"
columns={columns}
rowKey={record => record.id}
expandedRowRender={record => (
<ProductDetailView
record={record}
onChange={this.OnCoverageProductNumberChanged()}
/>
)}
dataSource={products}
pagination={this.state.pagination}
loading={this.props.isProductsLoading}
onChange={this.handleChange}
/>
當前正在發送一條記錄到ProductDetailView,它是一個react.component。我想知道如何將行索引發送到onChange事件,以便我可以跟蹤我正在查看的行。
我希望這是足夠的信息,基本上我只需要知道如何將行索引發送到我的onChange事件。
預先感謝您。
你要行索引發送到的onchange'ProductDetailView'組件或對於'Table'組件? –
productdetailview上創建的錶行索引。那樣就好了。 –