react-multi-select icon indicating copy to clipboard operation
react-multi-select copied to clipboard

Ordering of selected items

Open oriarditi opened this issue 6 years ago • 8 comments

Given any thought of ordering the selected items? Something like hamburgers to reorder selected items Thanks!

oriarditi avatar Jun 13 '18 12:06 oriarditi

Do you mean to have the ability to drag items inside the list or do you mean to have some sort of sort function?

liorheber avatar Jun 13 '18 12:06 liorheber

draggable items could be awesome!

oriarditi avatar Jun 13 '18 12:06 oriarditi

Sounds interesting. It means that we will need to store the order somewhere because unfortunately the selectedItems list is recreated every time. I'll look into it.

liorheber avatar Jun 13 '18 12:06 liorheber

Hey,

I think this can be done quite easily if the lib can also export defaults components used Sortable is easy to setup, as just need to:

  • add <div className="sortable-list"> on top of the actual destination list.
  • and use HOC sortable on selectedItemRenderer.

Maybe this is the best way to do it ?

sabativi avatar Dec 13 '18 20:12 sabativi

Hey @sabativi, thank you for looking into this.

Would you like to give this feature a go and try and issue a PR for it?

liorheber avatar Dec 14 '18 17:12 liorheber

It seems #117 was not merged. So it's still not possible to wrap the default components into a sortable HOC, right?

lukaspili avatar Mar 19 '20 22:03 lukaspili

Sorry @lukaspili I think he never got to finishing his PR. I'd be happy to push a change if you'd like to write it.

liorheber avatar Mar 20 '20 12:03 liorheber

Thanks for the quick response. At this point I'm just evaluating several options - including multi-select.

lukaspili avatar Mar 23 '20 16:03 lukaspili