Skip to content

feat: Row Pinning #4682

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

Closed
wants to merge 18 commits into from
Closed
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
5 changes: 5 additions & 0 deletions examples/react/row-pinning/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
6 changes: 6 additions & 0 deletions examples/react/row-pinning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Example

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
13 changes: 13 additions & 0 deletions examples/react/row-pinning/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" src="https://cdn.skypack.dev/twind/shim"></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions examples/react/row-pinning/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "tanstack-table-example-row-pinning",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview --port 3000",
"start": "vite"
},
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/react-table": "8.7.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.1",
"@vitejs/plugin-react": "^2.2.0",
"vite": "^3.2.3"
}
}
56 changes: 56 additions & 0 deletions examples/react/row-pinning/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
html {
font-family: sans-serif;
font-size: 14px;
}

.app {
padding: 1rem;
}

.container {
border: 1px solid lightgray;
max-height: 500px;
max-width: 1200px !important;
overflow: auto;
}

table {
border: 1px solid lightgray;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}

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

tbody {
border-bottom: 1px solid lightgray;
overflow: auto;
min-height: 500px;
}

th {
padding: 2px 4px;
}

td {
border-bottom: 1px solid lightgray;
padding: 2px 4px;
}

td:last-child {
border-right: 0;
}

tfoot {
color: gray;
}

tfoot th {
font-weight: normal;
}
Loading