draggable icon indicating copy to clipboard operation
draggable copied to clipboard

Add `insertBy` option to allow prepending or appending elements

Open developius opened this issue 4 years ago • 0 comments

This PR implements or fixes

This PR allows the user to specify whether they'd like the dragged element to be prepended or appended to the container. I have a use-case where I need to add the element to the top of a scrollable list of elements, so adding it to the bottom causes it to be below the fold and hence the user can't see it.

Does this PR require the Docs to be updated?

Yes, and I've done so (hope they're appropriate).

Does this PR require new tests?

Yes, I've added a default option and added a test for that to ensure backwards compatibility, but it could do with another test to check it actually works. I wasn't able to quickly find a way of doing that, any pointers would be appreciated.

This branch been tested on... (click all that apply / add new items)

Browsers:

  • [x] Chrome 96.0.4664.55
  • [x] Firefox 94.0.2
  • [x] Safari 15.1
  • [x] IE / Edge 96.0.1054.34
  • [ ] iOS Browser version
  • [ ] Android Browser version

developius avatar Nov 25 '21 21:11 developius