Issue with Edit Table with Nested JSON data. SandBox provided, please help! #3099
Unanswered
ankursehdev
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Team,
I want to create an editable table for a person's information. I have a nested JSON coming from the API that looks like this:
Details have an array of different details of a person.
I have the documentation and tried to create the similar functionality as in the Editable example but when I try to edit the NESTED properties, instead of updating the nested column it's adding a new property into the data.
I understand the
UPDATEMYDATA
function is only editing the top-level properties, how can I edit the nested properties of the object?Please have a look at below sand box.
https://codesandbox.io/s/compassionate-chatelet-til68?file=/src/App.js:4798-5262
Here when you try to edit - age, visit, status, height, weight. you can see it is being added as an additional property of the data object but not the original one.
Please advise, can I use nested JSON for editing? or I need to flatten these first?
Beta Was this translation helpful? Give feedback.
All reactions