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

Api feature request #180

Closed
feivur opened this issue Oct 19, 2022 · 1 comment
Closed

Api feature request #180

feivur opened this issue Oct 19, 2022 · 1 comment

Comments

@feivur
Copy link

feivur commented Oct 19, 2022

Please, add graggable item position parameter to callback canDragOver in class ReorderableState.
It is necessary for flexible work.

abstract class ReorderableState<T>(
    private val scope: CoroutineScope,
    private val maxScrollPerFrame: Float,
    private val onMove: (fromIndex: ItemPosition, toIndex: ItemPosition) -> (Unit),

    // here
    private val canDragOver: ((indexFrom: ItemPosition, indexTo: ItemPosition) -> Boolean)?,

    private val onDragEnd: ((startIndex: Int, endIndex: Int) -> (Unit))?,
    val dragCancelledAnimation: DragCancelledAnimation
) 
@VeselyJan92
Copy link
Contributor

I have made a pull request for this. Feel free to leave code review. #184

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