react-sortablejs icon indicating copy to clipboard operation
react-sortablejs copied to clipboard

how can i remove a specific item from the list ?

Open Ravi828rk opened this issue 4 years ago • 1 comments

example -

if i have two sortablejs list like this - list 1 list 2

  • item 1 - item 1 x
  • item 2 - item 2 x

and i want to remove item 1 form the list 2 by clicking x button, is it possible to do that?

Ravi828rk avatar May 08 '20 04:05 Ravi828rk

I wanted to do a similar thing. However I couldn't find a good way. In my case, I am trying to put X buttons on each list-item, to remove itself from a list (I think it's a very common usecase).

I read through the readme document, demo page as well as a bit of source code (where I found removeNode) but for me there seems to be no simple methods or functionalities that I can use to remove an item, except for spill. I hope someone could point out if there is a clean way to achieve that. It would be great if it's possible to use buttons to remove items, not only to spill.

toshimo avatar Jun 19 '20 04:06 toshimo