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

Unnecessary margin and height in DndContext div: Request for custom styles prop #1548

Open
nkgastromatic opened this issue Nov 25, 2024 · 0 comments

Comments

@nkgastromatic
Copy link

nkgastromatic commented Nov 25, 2024

Hi guys,
First of all, I want to say how awesome this library is! It's been incredibly helpful for implementing drag-and-drop functionality in my project.

However, I've encountered an issue when using the DndContext component. The div rendered by DndContext has some styling applied that results in extra spacing between my table header and body, which I'm unable to remove.

The styles being applied to this div are:
element.style { position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(100%); white-space: nowrap; }
And the div in question is rendered by DndContext:

image

I'm not against the styling itself, but this div is causing extra spacing in my layout, specifically between my table header and body. I've tried various methods to remove the spacing, but nothing seems to work.

Would it be possible to have the ability to pass custom styles to the DndContext's div or provide another solution to prevent the extra spacing?

Any guidance or assistance would be greatly appreciated!

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