Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

dnd-drop objects/hashes instead of arrays #181

Closed
dboundz opened this issue Nov 28, 2015 · 2 comments
Closed

dnd-drop objects/hashes instead of arrays #181

dboundz opened this issue Nov 28, 2015 · 2 comments
Assignees
Milestone

Comments

@dboundz
Copy link

dboundz commented Nov 28, 2015

My product has several ng-repeated lists based on objects, not arrays. There are a number of reasons why this is the case, the main one is the performance characteristics when accessing a particular object throughout the app, outside of the ng-repeat.

I've been trying to identify the appropriate way to manually handle insertion of the dropped object into the list but have not found a good solution given the lifecycle of events.

@marceljuenemann
Copy link
Owner

There isn't really a good way to perform the insertion manually at the moment, but you could do the insertion in the dnd-drop callback. You will need to return an object though, that then gets inserted by the directive. If you want to get really hacky you could use dnd-inserted as well and manipulate the list after the object was inserted.

Anyways, I should modify the dnd-drop callback to allow manual insertion.

@marceljuenemann marceljuenemann added this to the 1.4.0 milestone Jan 31, 2016
@marceljuenemann marceljuenemann self-assigned this Feb 4, 2016
@marceljuenemann
Copy link
Owner

You can now return true in dnd-drop to do the insertion yourself.

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

No branches or pull requests

2 participants