Closed jjeroch closed 3 weeks ago
@jjeroch Fundamental understanding of autoheight
seems wrong here. autoheight
is not meant to handle the auto height of a row. If a table is wrapped in container and the height has to be dynamic, then autoheight
helps to do so.
ex:
<Box sx={{ height: 100, width: "100%" }}>
<DataGrid
autoHeight={false}
rows=[
{
id: 1,
lastName: "Snow",
firstName: "Jon",
age: 14
},
{ id: 2, lastName: "Lannister", firstName: "Cersei", age: 31 },
{ id: 3, lastName: "Lannister", firstName: "Jaime", age: 31 },
{ id: 4, lastName: "Stark", firstName: "Arya", age: 11 },
{ id: 5, lastName: "Targaryen", firstName: "Daenerys", age: null },
{ id: 6, lastName: "Melisandre", firstName: null, age: 150 },
{ id: 7, lastName: "Clifford", firstName: "Ferrara", age: 44 },
{ id: 8, lastName: "Frances", firstName: "Rossini", age: 36 },
{ id: 9, lastName: "Roxie", firstName: "Harvey", age: 65 }]
/>
</Box>
<Box sx={{ height: 100, width: "100%" }}>
<DataGrid
autoHeight={true}
rows=[
{
id: 1,
lastName: "Snow",
firstName: "Jon",
age: 14
},
{ id: 2, lastName: "Lannister", firstName: "Cersei", age: 31 },
{ id: 3, lastName: "Lannister", firstName: "Jaime", age: 31 },
{ id: 4, lastName: "Stark", firstName: "Arya", age: 11 },
{ id: 5, lastName: "Targaryen", firstName: "Daenerys", age: null },
{ id: 6, lastName: "Melisandre", firstName: null, age: 150 },
{ id: 7, lastName: "Clifford", firstName: "Ferrara", age: 44 },
{ id: 8, lastName: "Frances", firstName: "Rossini", age: 36 },
{ id: 9, lastName: "Roxie", firstName: "Harvey", age: 65 }]
/>
</Box>
In the above example when autoheight
is false
UI screwed as the height is set to 100px. But when it changed to true
height adjusted for the whole container
Ticket Summary:
This ticket addresses an issue with the
autoHeight
parameter of the Table component which is not functioning as expected in Storybook.Issue Description:
autoHeight
parameter of the Table component documented at Table Component in Storybook is not operating correctly. The expected behavior is that the table adjusts its height automatically based on content, but this does not occur.Tasks:
Investigate and Identify Cause:
autoHeight
parameter is not working as documented.Code Adjustment:
autoHeight
parameter to ensure it functions correctly.Impact Analysis:
Acceptance Criteria:
autoHeight
parameter must function as expected, allowing the Table component's height to automatically adjust based on its content.Implementation Notes:
autoHeight
parameter.autoHeight
parameter.Technical Details:
Communication Plan: