The "Editable" examples all use table data managed in the state, whereas the "Remote Data" examples manage the data internally. What approach should I take if I want to do both?
You can use a function as the data prop where you make your API call to get your remote data. Then, supply functions to onRowAdd, onRowUpdate and onRowDelete of the editable prop where you make the appropriate API calls for mutating your data.
I personally use the react state approach. You're not as coupled to material-table that way.
You can use a function as the
dataprop where you make your API call to get your remote data. Then, supply functions toonRowAdd,onRowUpdateandonRowDeleteof theeditableprop where you make the appropriate API calls for mutating your data.
Hi, can you show us an example code please? I'm also trying to understand how to do this. Thanks.
You can use a function as the
dataprop where you make your API call to get your remote data. Then, supply functions toonRowAdd,onRowUpdateandonRowDeleteof theeditableprop where you make the appropriate API calls for mutating your data.Hi, can you show us an example code please? I'm also trying to understand how to do this. Thanks.
bump .
I am still very new to react and node apps in general. I would love to be able to look at an example!