Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update table data locally #1192

Closed
Tighrine opened this issue Oct 14, 2019 · 6 comments
Closed

Update table data locally #1192

Tighrine opened this issue Oct 14, 2019 · 6 comments
Labels
wontfix This will not be worked on

Comments

@Tighrine
Copy link

I got an issue when I try to update the table data locally using an action that block or unblock a device. I got this issue:
image
Here is my first data:

const [data, setData] = React.useState({ content: [ { id: 1, osVersion: "IOS 10", udid: "AB456875DSDSS54545dsD", user: "User 1", status: true }, { id: 2, osVersion: "Android 9", udid: "AB456875DSDSS54545dsD", user: "User 2", status: false }, { id: 3, osVersion: "IOS 12", udid: "AB456875DSDSS54545dsD", user: "User 1", status: true }, { id: 4, osVersion: "Android 8", udid: "AB456875DSDSS54545dsD", user: "User 1", status: false }, { id: 5, osVersion: "Android 7", udid: "AB456875DSDSS54545dsD", user: "User 3", status: true }, { id: 6, osVersion: "IOS 11", udid: "AB456875DSDSS54545dsD", user: "User 1", status: false }, { id: 7, osVersion: "IOS 10", udid: "AB456875DSDSS54545dsD", user: "User 3", status: false } ] })

@Tighrine
Copy link
Author

I noticed that material-table add "tableData" field to my state

@Domino987
Copy link
Collaborator

Yes but this will be removed with #1174 , I hope.

@Domino987
Copy link
Collaborator

Domino987 commented Oct 14, 2019

It fails because your data looks like this :
{content: [...]} But it has to be [...].
So remove the content wrapper and you should be fine.

@Tighrine
Copy link
Author

But I use it like this data.content so it is like this [...]

@Domino987
Copy link
Collaborator

Domino987 commented Oct 14, 2019

Ah ok , than it should not fail. Can you reproduce that in a Sandbox? (Not the tableData addition bit there error above)

@stale
Copy link

stale bot commented Jun 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

@stale stale bot added the wontfix This will not be worked on label Jun 15, 2020
@stale stale bot closed this as completed Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants