Column prop render functions #267
-
I'm encountering the new warning message "The columns provided to material table are static, but contain functions which update on every render, resetting the table state. Provide a stable function or column reference or an row id to prevent state loss." I'm at a loss as to how to resolve it. I'm passing in a render function that depends on the data contents for each row in that column. Here's one example: const ItemList = (props) => { And my MaterialTable has: Advice on an approach to avoid the warning? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
It would be easier to help if you used one of our CodeSandbox templates and created a demo of this issue. You may need to memoize or use a ref. |
Beta Was this translation helpful? Give feedback.
-
Since this is more of an issue/bug/question than anything, I have moved it here |
Beta Was this translation helpful? Give feedback.
Since this is more of an issue/bug/question than anything, I have moved it here