mui-data-table icon indicating copy to clipboard operation
mui-data-table copied to clipboard

Re-render on state changing

Open andredeloliveira opened this issue 8 years ago • 4 comments

Hello,

I'm using redux to control all my state changing. All the other components are being re-rendered but the same doesn't happen in the mui-data-table.

Is there any support for re-rendering?

andredeloliveira avatar Nov 28 '16 18:11 andredeloliveira

Had same issue - tried various ; in the end I set a key on the MuiDataTable element and that cause it to pickup the changes. Requires the key value to change evidently based on whatever triggers your config changes

 <MuiDataTable key={somevalue} config={myConfig}/>

trorbyte avatar Feb 27 '17 16:02 trorbyte

@trorbyte How did you do that ? When I add the key value and re-render happen my data doesn't change inside of component.

darcusfenix avatar Mar 28 '17 02:03 darcusfenix

Does your key change?

tbh I'm no longer using this component - and have reverted to a plain table.

trorbyte avatar Mar 29 '17 14:03 trorbyte

Adding a key that changes worked for me.

nevermind89x avatar Jun 01 '17 20:06 nevermind89x