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

Dragged item "jumping" when dragging an item from nested group to root group #196

Open
ivan-banha opened this issue Dec 3, 2020 · 1 comment

Comments

@ivan-banha
Copy link

Hi.

I'm developing a list of items which can has nested list. I need a possibility to rearrange items in the root list and nested lists. Also, where should be the possibility to drag items between the root list and nested lists.

When I'm dragging an item from root list to a nested list, everything works fine. But when I'm dragging an item from nested list to root list my fallback item is jumping over the page. It seems like it happened when the item is moved out of the nested sortable area.

Here is the video.

This is my config. It's the same for the root group and nested groups

animation={210}
delay={100}
delayOnTouchOnly={true}
ghostClass={classes.ghostCard}
group="shared"
handle=".boardItemDragTrigger"
forceFallback={true}
fallbackClass={classes.draggedCard}
className={classes.sortableList}
id={parentSection.id}

If I set forceFallback: false it starts work fine but my styles from fallbackClass are not applied.
react-sortablejs: 2.0.11

What can cause this kind of problem?

@kosenkobogdan
Copy link

I believe the reason for jumping can be other styles applied somewhere in the component tree. You can try fallbackOnBody, it might help.

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

2 participants