-
Notifications
You must be signed in to change notification settings - Fork 95
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
Incorrect dragging preview item position when using shadcn popover #847
Comments
It looks like the issue is the drag preview item is using a wrong positioning system. If I drag the item, and put my mouse at the very top left corner of the website, then the drag preview item is shown where it should've been when our mouse was inside the draggable list. I'm not sure how to fix this. |
Fixed thanks to atlassian/react-beautiful-dnd#2056 :
However, it apparently won't work for vertical list with scrolling:
I hope a proper fix can be implemented without needing to do this extra fix to get it working. |
For the next person/agent: {options.map(
(option: FieldOption, optionIndex: number) => (
<Draggable
key={optionIndex}
draggableId={`option-${optionIndex}`}
index={optionIndex}
>
{(provided) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
className="flex gap-2"
style={{
...provided.draggableProps.style,
left: "auto !important",
top: "auto !important",
}}
>
... |
I'm guessing this is an issue whenever the Draggable is inside any parent that has |
If the draggable list is inside of a shadcn popover, the item is not visible while being dragged. Is there any way to fix this?
The text was updated successfully, but these errors were encountered: