Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][Table] Fixed scrollbar such that it start from the first row of the table in Sticky Header table #45056

Closed
15 changes: 15 additions & 0 deletions docs/data/material/components/table/StickyHeadTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ export default function StickyHeadTable() {

return (
<Paper sx={{ width: '100%', overflow: 'hidden' }}>
<Table stickyHeader aria-label="sticky table">
<TableHead>
<TableRow>
{columns.map((column) => (
<TableCell
key={column.id}
align={column.align}
style={{ minWidth: column.minWidth }}
>
{column.label}
</TableCell>
))}
</TableRow>
</TableHead>
</Table>
<TableContainer sx={{ maxHeight: 440 }}>
<Table stickyHeader aria-label="sticky table">
<TableHead>
Expand Down
15 changes: 15 additions & 0 deletions docs/data/material/components/table/StickyHeadTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ export default function StickyHeadTable() {

return (
<Paper sx={{ width: '100%', overflow: 'hidden' }}>
<Table stickyHeader aria-label="sticky table">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<TableHead>
<TableRow>
{columns.map((column) => (
<TableCell
key={column.id}
align={column.align}
style={{ minWidth: column.minWidth }}
>
{column.label}
</TableCell>
))}
</TableRow>
</TableHead>
</Table>
<TableContainer sx={{ maxHeight: 440 }}>
<Table stickyHeader aria-label="sticky table">
<TableHead>
Expand Down
Binary file not shown.
Binary file not shown.
Loading