ValentinH / react-easy-sort

A React component to sort items in lists or grids
https://ValentinH.github.io/react-easy-sort
MIT License
160 stars 25 forks source link

Is there a way to freeze/lock/fix a sortable item in place by index while maintaining the normal sorting behavior? #45

Closed MorkWood2 closed 6 months ago

MorkWood2 commented 6 months ago

I'd like to create a sortable list with many sortable items and I was wondering the possibility for setting a specific item to be fixed so that it maintains it's index and other cards are moved around the fixed item as though it is a nominal behavior. Haven't seen an example of it, nor anything in the docs that can pull off that magic.

ValentinH commented 6 months ago

This is not supported and I think it would require quite some change to land this feature. Preventing any interaction would be pretty simple IMO. However, having other items being moved around would require more logic in the layout logic.

I'm available to review a PR if needed.

MorkWood2 commented 6 months ago

Gotcha, just wondering. Thank you.