Skip to content

Pull revert Or Limit number of items #1877

Description

@LukeTOBrien

Hello chaps.

I Have two containers, A and B, containers B is empty and I want to choose one item from container A and drag it inside.
Container B can only have one item inside, so therefore I either want to swap the item being dragged with the item already in the container or I want to revert on pull so that no item is dragged into container B but the onEnd event still fires.

I am using a framework which means that the text of container B is bound to the object I am creating, so I don't need the dragged item to stay in place.
So in my lil app I am creating an appointment, I have a list of doctors and a list of patients, and the appointment with a placeholder for each, but when I drag I can keep on adding to the placeholders.

I can create a CodePen if that will help illustrate.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionquestions from the community

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions