Search code examples
javascriptreactjsmaterial-table

In React material tree table when i add a new row in tree table that row should be expand default


<MaterialTable title="title" columns={columns} data={data} icons={tableIcons} parentChildData={(row, rows) => rows.find((a) => a.id === row.productId)} />


Solution

  • <MaterialTable title="title" columns={columns} data={data} icons={tableIcons} parentChildData={(row, rows) => rows.find((a) => a.id === row.productId)} defaultExpanded/>