-
Notifications
You must be signed in to change notification settings - Fork 28
Description
After the user finishes their edits on some rows in the table (using ), I was wondering if it is possible to convert the new modified TreeState into the same format as the data used to create the TreeState. How would I do such a thing?
Example:
const MOCK_DATA = [
{
data: { name: 'Company A', expenses: '105,000', employees: '22', contact: 'Makenzie Higgs' },
children: [
{
data: { name: 'Department 1', expenses: '75,000', employees: '18', contact: 'Florence Carter' }
}
]
}
];
...
treeValue: TreeState.create(MOCK_DATA)
...
and then after the edits/changes, we can turn treeValue into the below:
const NEW_MOCK_DATA = [
{
data: { name: 'Company A', expenses: '105,000', employees: '22', contact: 'John Doe' },
children: [
{
data: { name: 'Department 1', expenses: '75,000', employees: '18', contact: 'John Doe' }
}
]
}
];