Skip to content

fix: sticky columns at end fix #12

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

Open
wants to merge 1 commit into
base: deploy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/table/example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const handleEdit = (value,rowIndex,key) => {

### Fixed Column Table

A table can have any number of fixed columns on left.
A table can have any number of fixed columns on left and fixed column on the end.

```jsx preview
const [data] = useState(Array(20).fill({ id: 1, name: 'Jane Doe', }));
Expand All @@ -102,7 +102,7 @@ const [data] = useState(Array(20).fill({ id: 1, name: 'Jane Doe', }));
</Table.Column>

{
Array(14) // create empty array of length 14
Array(40) // create empty array of length 14
.fill(null) // fill it with null so we map over it
.map(
(_, index) => (
Expand Down
4 changes: 4 additions & 0 deletions components/table/src/renderers/simple.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
position: sticky;
left: var(--sticky-left-offset, 0);
z-index: 1;
&.end {
right: 0;
left: auto;
}
}

th.fixed {
Expand Down