Skip to content

Commit

Permalink
row pinning css (#5075)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy authored Sep 17, 2023
1 parent 7700c6d commit 5086e8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions examples/react/row-pinning/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ table {
border: 1px solid lightgray;
}

thead {
background: lightgray;
margin: 0;
position: sticky;
top: 0;
}

tbody {
border-bottom: 1px solid lightgray;
}
Expand All @@ -33,3 +40,10 @@ tfoot {
tfoot th {
font-weight: normal;
}

.container {
border: 1px solid lightgray;
height: 500px;
max-width: 900px !important;
overflow: auto;
}
2 changes: 1 addition & 1 deletion examples/react/row-pinning/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function PinnedRow({ row, table }: { row: Row<any>; table: Table<any> }) {
position: 'sticky',
top:
row.getIsPinned() === 'top'
? `${row.getPinnedIndex() * 26 + 50}px`
? `${row.getPinnedIndex() * 26 + 48}px`
: undefined,
bottom:
row.getIsPinned() === 'bottom'
Expand Down

0 comments on commit 5086e8a

Please sign in to comment.