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

Unable to forbid certain item to move at certain index #90

Open
vtarelkin opened this issue Oct 4, 2022 · 1 comment
Open

Unable to forbid certain item to move at certain index #90

vtarelkin opened this issue Oct 4, 2022 · 1 comment

Comments

@vtarelkin
Copy link

@tajo hi and thank you for your library!
I wonder are there any options in onChange handler to forbid to move certain item to certain position (for example at the start of the list) ? Cannot get the value of the dragged element.

@vtarelkin vtarelkin changed the title Unable to forbit certain item to move at certain index Unable to forbid certain item to move at certain index Oct 5, 2022
@vtarelkin
Copy link
Author

this library definitely need some customizing on dragged item.

something like

beforeDrag?: (params: BeforeDragParams) => void;
export interface BeforeDragParams {
    elements: Element[];
    oldIndex: number;
    plannedIndex: number;
}

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

1 participant