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

[bug]: unexpected margin between multiple pinned columns in useDataTable columnPinning #913

Open
Loosand opened this issue Mar 5, 2025 · 1 comment

Comments

@Loosand
Copy link

Loosand commented Mar 5, 2025

Issue Description

When using the columnPinning feature in useDataTable to freeze multiple columns, I've noticed that an unexpected margin/gap appears between the pinned columns. This creates a discontinuous UI appearance, affecting the overall visual experience and usability of the table.

Create a data table using useDataTable

Configure columnPinning to pin multiple columns (e.g., columnPinning: { left: ['column1', 'column2', 'column3'] })
Render the table and observe the result
Notice the unexpected gaps/margins between the pinned columns

Expected Behavior

When multiple columns are pinned, they should appear tightly connected without any extra margins or gaps between them, visually presenting as one continuous pinned area.
Actual Behavior
There are noticeable gaps/margins between multiple pinned columns, making the pinned area look disconnected and breaking the visual integrity of the table.
Environment Information

How to reproduce

2025-03-05.10.56.49.mov

Link to reproduction

https://github.com/sadmann7/shadcn-table/blob/main/src/app/_components/tasks-table.tsx

@Loosand
Copy link
Author

Loosand commented Mar 5, 2025

This link may fix the problem

TanStack/table#5783 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant