You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-9
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ Apply the directive to your form elements:
51
51
**Developing Notes:**
52
52
53
53
*`ng-model` is required, so that the directive knows which model to update.
54
-
*`ui-sortable` element should only contain one `ng-repeat` and not any other elements (above or below).
55
-
Otherwise the index matching of the generated DOM elements and the `ng-model`'s items will break.
56
-
**In other words: The items of `ng-model` must match the indexes of the generated DOM elements.**
54
+
*`ui-sortable` element should contain only one `ng-repeat`, but other non-repeater elements above or below may still exist.
55
+
Otherwise the index matching of the `ng-model`'s items and the DOM elements generated by the `ng-repeat` will break.
56
+
**In other words: The items of `ng-model` must match the indexes of the DOM elements generated by the `ng-repeat`.**
57
57
*[`Filters`](https://docs.angularjs.org/guide/filter) that manipulate the model (like [filter](https://docs.angularjs.org/api/ng/filter/filter), [orderBy](https://docs.angularjs.org/api/ng/filter/orderBy), [limitTo](https://docs.angularjs.org/api/ng/filter/limitTo),...) should be applied in the `controller` instead of the `ng-repeat` (refer to [the provided examples](#examples)).
58
58
This is the preferred way since it:
59
59
- is performance wise better
@@ -90,12 +90,6 @@ The suggested pattern is to use callbacks for emmiting events and altering the s
90
90
91
91
#### Floating
92
92
93
-
**Update**: Issue [~~7498~~](bugs.jqueryui.com/ticket/7498) was resolved in jquery-ui v1.11.4.
94
-
Calling `angular.element('ui-sortable').sortable('refresh')` (use a more appropriate selector in your use case)
95
-
should make jquery-ui-sortable recognize the position and orientation of the existing and any new items.
96
-
As a result, since ui-sortable makes a call to `sortable('refresh')` after the sortable items are created by the repeater, it is not any more necessary to use the `ui-floating` property if the orientation of your list is not changing dynamically.
97
-
**TL;DR:** If you are using jquery-ui v1.11.4+ and you are not changing the orientation of your list dynamically, then you probably don't need to use `ui-floating` property.
98
-
99
93
To have a smooth horizontal-list reordering, jquery.ui.sortable needs to detect the orientation of the list.
100
94
This detection takes place during the initialization of the plugin (and some of the checks include: whether the first item is floating left/right or if 'axis' parameter is 'x', etc).
101
95
There is also a [known issue](bugs.jqueryui.com/ticket/7498) about initially empty horizontal lists.
@@ -210,6 +204,7 @@ For more details about the events check the [jQueryUI API documentation](http://
0 commit comments