material-table
material-table copied to clipboard
parentChildData inside Dialog exceeds maximum call stack
Describe the bug Using material-table inside Dialog and providing it parentChildData causes "Maximum call stack size exceeded".
To Reproduce I have created a sandbox test, visit this: https://codesandbox.io/s/dreamy-driscoll-r2xwg
Expected behavior Render data relating parent and child.
Desktop (please complete the following information):
- OS: Windows 10 Pro
- Browser: Opera
- Version: 66.0.3515.103
Extra: I tried using disableEnforceFocus in Dialog but it does not solves the issue either.
The problem is not in the dialog, it's in your data. You're missing an Id there
const columns = [
{ title: "Provider", field: "providerName" },
{ title: "Product", field: "product" }
];
const data = [
{ id: 1, providerName: "My name" },
{ id: 2, parentId: 1, product: "Product" }
];
You are completelly rigth. The issue is that all data rows must have id sequence. Thank you for your quickly response.