How to get cell value on React-Table?
Asked Answered
A

2

10

I develop in React.js, and I'm using React-Table. I need to get cell value in a specific column.

I have made a reference to the table component to access its internal state.

but I don't know where to find the cell value from a column.

Is it possible to get cell value on a column?

Alexina answered 26/3, 2018 at 9:33 Comment(0)
S
8

When you are creating the columns, for the Cell section you can specify a function which will read the value of the cell

Cell: v => console.log(v.value)

Columns

Scholarship answered 26/3, 2018 at 9:53 Comment(0)
E
2

For React table v8 or above, the cell API changes to getValue() function instead of value

cell: v => <i> { v.getValue() } </i>
Eatton answered 25/11, 2023 at 0:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.