You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a React state variable inside the body function of a Column (in a DataTable), the body function does not re-run when the state changes. This causes the column to not reflect the updated value even though React re-rendered the parent component.
Describe the bug
When using a React state variable inside the
bodyfunction of aColumn(in aDataTable), thebodyfunction does not re-run when the state changes. This causes the column to not reflect the updated value even though React re-rendered the parent component.Reproducer
https://stackblitz.com/edit/vtzimrpe?file=src%2FApp.jsx
System Information
Steps to reproduce the behavior
Toggle Edit Disablebutton. This should toggledisableEditstate.Editbutton insideReviewscolumn is disabled or not.Expected behavior
Toggle Edit Disablebutton, should toggle disable/enable forEditbutton inReviewscolumn.