Skip to content

Sortable instance to which element moved in onAdd() #706

Closed

Description

@mxmzb

How do you get the Sortable parent of the element, which gets the new draggable element, in the onAdd() method?

Activity

  1. RubaXa commented on Dec 23, 2015

    @RubaXa
    Collaborator
      onAdd(evt) {
         evt.to; // HTMLElement
         evt.from; // HTMLElement     
      }
  2. mxmzb commented on Dec 23, 2015

    @mxmzb
    Author

    evt.to will be undefined, I already tried that.

  3. mxmzb commented on Dec 31, 2015

    @mxmzb
    Author

    Sorry for the late reply, I kinda was distracted recently. I guess it doesn't work for me then, because I have Sortable integrated with angular?
    My production code looks (simplified) basically like this: http://jsbin.com/hucesu/edit?html,js,console,output
    How would I receive the evt.to and evt.from here (I didn't notice evt.from is also undefined until now, as I needed only evt.to)?

  4. mxmzb commented on Jan 28, 2016

    @mxmzb
    Author

    I really don't want to impose, but could you please have another look on this @RubaXa ?

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