-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: prevent sticky pinned column overlap #6386
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -349,20 +349,25 @@ class LitTableExample extends LitElement { | |
| } | ||
|
|
||
| table { | ||
| table-layout: fixed; | ||
| } | ||
|
|
||
| th { | ||
| background-color: lightgray; | ||
| border-bottom: 1px solid lightgray; | ||
| box-sizing: border-box; | ||
| font-weight: bold; | ||
| height: 30px; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| position: relative; | ||
| text-align: center; | ||
| } | ||
|
Comment on lines
+352
to
365
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
The
The reported bug (sticky column overlap) is a horizontal-axis mismatch only; scope the clip accordingly to avoid the regression: 🛡️ Proposed fix th {
background-color: lightgray;
border-bottom: 1px solid lightgray;
box-sizing: border-box;
font-weight: bold;
height: 30px;
- overflow: hidden;
+ overflow-x: hidden;
padding: 2px 4px;
position: relative;
text-align: center;
}🤖 Prompt for AI Agents |
||
|
|
||
| td { | ||
| background-color: white; | ||
| box-sizing: border-box; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| } | ||
|
|
||
|
|
@@ -493,6 +498,8 @@ class LitTableExample extends LitElement { | |
| border-color: #000; | ||
| } | ||
| .nowrap { | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
| .demo-note { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,20 +17,25 @@ table { | |
| /* box-shadow and borders will not work with position: sticky otherwise */ | ||
| border-collapse: collapse; | ||
| border-spacing: 0; | ||
| table-layout: fixed; | ||
| } | ||
|
|
||
| th { | ||
| background-color: lightgray; | ||
| border-bottom: 1px solid lightgray; | ||
| box-sizing: border-box; | ||
| font-weight: bold; | ||
| height: 30px; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| position: relative; | ||
| text-align: center; | ||
| } | ||
|
Comment on lines
23
to
33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
rg -n "pin-actions|resizer" examples/preact/column-pinning-sticky/src/main.tsx -A3 -B3Repository: TanStack/table Length of output: 982 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== main.tsx relevant section =="
sed -n '170,255p' examples/preact/column-pinning-sticky/src/main.tsx
echo
echo "== index.css relevant section =="
sed -n '1,120p' examples/preact/column-pinning-sticky/src/index.cssRepository: TanStack/table Length of output: 5285 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n "\.(pin-actions|pin-button|resizer|nowrap)\b|pin-actions|pin-button|resizer|nowrap" examples/preact/column-pinning-sticky/src/index.css examples/preact/column-pinning-sticky/src/main.tsx -A4 -B4Repository: TanStack/table Length of output: 9873 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Preact markup =="
sed -n '185,250p' examples/preact/column-pinning-sticky/src/main.tsx
echo
echo "== Lit markup =="
fd -a 'main.ts' examples/lit/column-pinning-sticky/srcRepository: TanStack/table Length of output: 3052 🏁 Script executed: #!/bin/bash
set -euo pipefail
nl -ba examples/preact/column-pinning-sticky/src/main.tsx | sed -n '185,250p'
echo
nl -ba examples/preact/column-pinning-sticky/src/index.css | sed -n '1,80p'Repository: TanStack/table Length of output: 192 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== locate column-pinning-sticky examples =="
fd -a 'index.css' examples | rg 'column-pinning-sticky'
echo
fd -a 'main.tsx' examples | rg 'column-pinning-sticky'
echo
echo "== search for overflow settings and header controls in similar demos =="
rg -n "overflow-x: hidden|overflow: hidden|pin-actions|resizer|nowrap" examples -g 'index.css' -g 'main.tsx' -g '*.ts' -g '*.tsx'Repository: TanStack/table Length of output: 50370 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Lit sticky header markup =="
sed -n '235,310p' examples/lit/column-pinning-sticky/src/main.ts
echo
echo "== Lit sticky relevant CSS =="
sed -n '350,515p' examples/lit/column-pinning-sticky/src/main.tsRepository: TanStack/table Length of output: 7625 Keep the header controls out of the clipped 🤖 Prompt for AI Agents |
||
|
|
||
| td { | ||
| background-color: white; | ||
| box-sizing: border-box; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| } | ||
|
|
||
|
|
@@ -187,6 +192,8 @@ td { | |
| } | ||
|
|
||
| .nowrap { | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,20 +16,25 @@ html { | |
| table { | ||
| border-collapse: collapse; | ||
| border-spacing: 0; | ||
| table-layout: fixed; | ||
| } | ||
|
|
||
| th { | ||
| background-color: lightgray; | ||
| border-bottom: 1px solid lightgray; | ||
| box-sizing: border-box; | ||
| font-weight: bold; | ||
| height: 30px; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| position: relative; | ||
| text-align: center; | ||
| } | ||
|
Comment on lines
22
to
32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
rg -n "pin-actions|resizer" examples/solid/column-pinning-sticky/src/App.tsx -A3 -B3Repository: TanStack/table Length of output: 982 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n## App.tsx excerpt\n'
sed -n '160,235p' examples/solid/column-pinning-sticky/src/App.tsx
printf '\n## index.css excerpt\n'
sed -n '1,80p' examples/solid/column-pinning-sticky/src/index.cssRepository: TanStack/table Length of output: 4618 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n "^(\.pin-actions|\.nowrap|\.resizer|th \{|td \{|\.table-container|\.button-row)" examples/solid/column-pinning-sticky/src/index.css -A8 -B3
printf '\n## Tail of CSS\n'
sed -n '80,180p' examples/solid/column-pinning-sticky/src/index.cssRepository: TanStack/table Length of output: 3233 Keep the header controls visible
🤖 Prompt for AI Agents |
||
|
|
||
| td { | ||
| background-color: white; | ||
| box-sizing: border-box; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| } | ||
|
|
||
|
|
@@ -186,6 +191,8 @@ td { | |
| } | ||
|
|
||
| .nowrap { | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,20 +16,25 @@ html { | |
| table { | ||
| border-collapse: collapse; | ||
| border-spacing: 0; | ||
| table-layout: fixed; | ||
| } | ||
|
|
||
| th { | ||
| background-color: lightgray; | ||
| border-bottom: 1px solid lightgray; | ||
| box-sizing: border-box; | ||
| font-weight: bold; | ||
| height: 30px; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| position: relative; | ||
| text-align: center; | ||
| } | ||
|
Comment on lines
22
to
32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
rg -n "pin-actions|resizer" examples/svelte/column-pinning-sticky/src/App.svelte -A3 -B3Repository: TanStack/table Length of output: 903 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== App.svelte header area ==="
sed -n '160,235p' examples/svelte/column-pinning-sticky/src/App.svelte
echo
echo "=== index.css relevant rules ==="
sed -n '1,120p' examples/svelte/column-pinning-sticky/src/index.cssRepository: TanStack/table Length of output: 5046 Avoid clipping the pin actions 🤖 Prompt for AI Agents |
||
|
|
||
| td { | ||
| background-color: white; | ||
| box-sizing: border-box; | ||
| overflow: hidden; | ||
| padding: 2px 4px; | ||
| } | ||
|
|
||
|
|
@@ -186,6 +191,8 @@ td { | |
| } | ||
|
|
||
| .nowrap { | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: TanStack/table
Length of output: 33356
🏁 Script executed:
Repository: TanStack/table
Length of output: 32380
🏁 Script executed:
Repository: TanStack/table
Length of output: 1203
Keep
thclipping horizontal onlyexamples/angular/column-pinning-sticky/src/app/app.htmlrenders.pin-actionsinside each pinnable header cell, sooverflow: hiddenon the fixed-30pxthcan clip the pin buttons.overflow-x: hiddenpreserves the intended horizontal crop without hiding the controls.Proposed fix
th { background-color: lightgray; border-bottom: 1px solid lightgray; box-sizing: border-box; font-weight: bold; height: 30px; - overflow: hidden; + overflow-x: hidden; padding: 2px 4px; position: relative; text-align: center; }📝 Committable suggestion
🤖 Prompt for AI Agents