Skip to content

Prevent initial scroll jump in NestedDraggableFlatlist#514

Open
ersefuril wants to merge 1 commit into
computerjazz:mainfrom
ersefuril:main
Open

Prevent initial scroll jump in NestedDraggableFlatlist#514
ersefuril wants to merge 1 commit into
computerjazz:mainfrom
ersefuril:main

Conversation

@ersefuril

Copy link
Copy Markdown

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) => {

Copy link
Copy Markdown

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.

@maroparo maroparo left a comment

Copy link
Copy Markdown

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
Copy Markdown

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

@techearthshaker

Copy link
Copy Markdown

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

@brimby

brimby commented Sep 30, 2024

Copy link
Copy Markdown

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
Copy Markdown

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