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

On Long press trigger #2

Closed
planasmultimedia opened this issue Mar 12, 2024 · 5 comments
Closed

On Long press trigger #2

planasmultimedia opened this issue Mar 12, 2024 · 5 comments

Comments

@planasmultimedia
Copy link

Nice project man ! Its so useful, i was wondering if you could include a LongPress trigger so its more usable, also i'm having troubles to scroll, it detects the drag state.

Thank you for your contribution !

@MohamedRejeb
Copy link
Owner

MohamedRejeb commented Mar 12, 2024

Thanks!
I'll try to provide clear documentation ASAP. The long press is supported, you can try this:

rememberReorderState<Type>(
    dragAfterLongPress = true
)

@planasmultimedia
Copy link
Author

planasmultimedia commented Mar 12, 2024

Cool ! Thank you very much for your quick response <3. I was also trying to enable/disable the behaviour, using an "Edit" button to enable the drag and drop feature. Is better to change between the Draggable list and a simple lazy column to enable/disable or there is any other feature?

I was having troubles with the scroll down when dragging, is there any flag?

@MohamedRejeb
Copy link
Owner

I'm considering adding this feature in the next release. It should be available this week with the update to compose 1.6.0.

The current implementation of the scroll down while dragging is not the best. That's why I added it only in the sample, not in the library itself. I'll try to improve it more.

@MohamedRejeb
Copy link
Owner

I'll close this issue since the long click is supported, can you open a new one issue for the enable/disable drag feature?

@planasmultimedia
Copy link
Author

Thank man ! Looking forward to it

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