T
TanStack16mo ago
ambitious-aqua

Control accessor dynamic based on changing react state?

Is it possible for the value shown in a column to be dynamic based on react state? I have a user controllable filter and I want to pull different values from my row based on what is selected. Tried this but didn't work. It works on load but not when the state changes. buyOrRent is a useState variable.
columnHelper.accessor((row) => {
return row.price[buyOrRent].max;
}, {
columnHelper.accessor((row) => {
return row.price[buyOrRent].max;
}, {
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?