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

Support handle/knob #14

Closed phaistonian closed 3 years ago

phaistonian commented 3 years ago

I think the title does it :-)

ValentinH commented 3 years ago

Do you have an example API in mind for this feature? How would you like to use it?

phaistonian commented 3 years ago

Here's a usecase:

CleanShot 2021-06-28 at 12 20 35@2x

In terms of API, I guess you can:

ValentinH commented 3 years ago

I check back the code quickly and this is not trivial to implement. Indeed, the events handling logic is handled at the SortableList level and we would need to maintain a list of all knobs in addition to the items. Once, this is done, I'm not even sure that events will behave like you would expect outside of the knob.

I'm available to provide guidance if you would like to work a on PR though. 🙂

phaistonian commented 3 years ago

Well, it does not look that hard - really.

I can't find time to put on it, though - hectic days down here.

Perhaps later in the near future.