react-table custom cell component that references several row properties

后端 未结 2 669
失恋的感觉
失恋的感觉 2021-02-07 12:14

I need to implement table sorting by column so am rewriting my react table component using react-table\'s ReactTable component.

One of table cells will contain a link an

2条回答
  •  遇见更好的自我
    2021-02-07 13:10

    It turned out I needed to use cellInfo.original rather than cellInfo.row. When you provide a Cell renderer you should use cellInfo.original to get at all of your row data (especially if you aren’t showing that data as columns). The row only has what is displayed in the table.

提交回复
热议问题