Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add insertBy option to allow prepending or appending elements #514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

developius
Copy link

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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant