I have an antd
table, where there is an expandable row. I want to render data based on the row that I click as each row has a unique code. How do I get the target value of the row so as to filter data accordingly?
<Table
components={components}
bordered
dataSource={dataSource}
columns={tableColumns}
expandable={{ expandedRowRender,
onClick: (e) =>findId(+e.target.value),
}}
Do I use onRow? Not sure how onClick
is used in antD
table or an expandable table. I've also got
expandRowByClick: true,
enabled in the expandable. So I have two questions
- How can I expand the table by clicking only one particular cell
- When expanded, how can I capture the clicked row so that I can render data accordingly to the expanded table?