Column Helper Accessor Function Update on Component State Updates #4868
Replies: 1 comment
-
Hi, I am also having this problem as well. In an attempt to solve it, I have found a workaround: It seems like the accessor function will only be updated if My workaround is, whenever the dependencies change, which is const rows = React.useMemo(() => [...data], [data, isUpperCase]); Here's the sandbox with my workaround applied: HERE This is also mentioned in the docs.
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I am using accessor Function to format my cell (to make sure filtering works with formatted Values).
In my use case, the user can determine the custom formatting rules. In this example : convert last name cell value to uppercase.
The formatting rules are component state, but when they update the accessor function does not update. As a result the cell's do not reflect the formatting changes.
Here is my sandbox: https://codesandbox.io/p/sandbox/interesting-parm-z247ye?welcome=true.
Am I missing something here ?
Beta Was this translation helpful? Give feedback.
All reactions