Material-table: A table that is both "Editable" and uses "Remote Data"

Created on 31 Jul 2019  路  4Comments  路  Source: mbrn/material-table

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?

help wanted

All 4 comments

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 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.

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 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.

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slevy85 picture slevy85  路  3Comments

VipinJoshi picture VipinJoshi  路  3Comments

behrouz-s picture behrouz-s  路  3Comments

bohrsty picture bohrsty  路  3Comments

KKrisu picture KKrisu  路  3Comments