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

Prevent initial scroll jump in NestedDraggableFlatlist #514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ersefuril
Copy link

There is a small glitch when you try to drag n drop an item after performing an initial scroll.
This seems to occurs only in NestedDraggableFlatList.
The outer scroll position is not updated after doing a scroll, which causes a "jump".
It should fix this issue : #509

() => {
return outerScrollOffset.value;
},
(cur, prev) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second parameter here doesn't seem to be used, and can be safely removed.

Copy link

@maroparo maroparo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what its worth, I approve the change. Seems to be working! 🚀

@The0racle
Copy link

Will this PR be merged? I'm having the same issue and don't want to use patch-package

@zhen1007
Copy link

zhen1007 commented Sep 3, 2024

@ersefuril Your solution doesn't work on my side.

@brimby
Copy link

brimby commented Sep 30, 2024

Any chance this is going to be ironed out soon? I definitely see the bug but I haven't tried patching this in yet. I found that as a workaround you can set activationDistance={0}, but this has the unhappy consequence of making nested lists unscrollable unless you drag on a non-list-item element.

@Username2101
Copy link

Doesnt work on my end. Does anyone else know the fix?

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

Successfully merging this pull request may close these issues.

6 participants