-
Notifications
You must be signed in to change notification settings - Fork 441
How do I get the helper option to work? Especially with "clone". #270
Comments
What do you mean by The exact same thing happens in ui-sortable but the actual model item is moved (no matter what you use for the helper option). After the sorting, ui-sortable kicks in and transfers the model and then both ng-repeat's detect that their model has changed and update the DOM I was initially thinking of actually doing this internally in case
helper: function (e, item) {
return item.clone();
} Should it guess that this is equivalent to As a result, in the current version
Do you think that |
Thanks for your prompt reply. Some of the stuff you said went over my head since I have no prior experience with JQuery but I more or less understood your point. I have two questions:
Thanks. |
I would suggest you take a look at #139 and especially this comment. Also take a look at this fiddle that demonstrates what
|
Thanks for the resource, I'll def take a look. So the reason I want to do this clone stuff is because of this issue... http://plnkr.co/edit/AwdAivvVZcnV9aDxbp7m?p=info When you drag an element from the source to the destination, if the source div has "position: fixed", the dragged element will get cut off when it reaches the edge of the div. To get around this problem, I thought it would help if when I start dragging, I can use JQuery to attached the element to Body. Do you know if that will work? Maybe a better way to get around this problem? |
|
Update: I put appendTo: "body" into options and it worked like a charm. |
Hi, Sorry to bring up an old issue, but I was having the same problem and eventually realized that appendTo doesn't work without specifying a helper (other than default). Unfortunately, this wasn't noted anywhere in the jQuery UI docs. Just wanted to confirm this is the expected result, and also to put it on the record for anyone who's new to ui sortable like me. For reference, this is what I eventually used: |
Hi there. Thodoris Greasidis |
Does this library implement JQuery's native clone feature?
I know there is an example of a "clone" but it doesn't use JQuery's native helper. It only adds a element back to the original list after it has been dropped.
Here is a plunker: http://plnkr.co/edit/AwdAivvVZcnV9aDxbp7m?p=info
Any advice is appreciated.
The text was updated successfully, but these errors were encountered: