Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit a258424

Browse files
committed
docs(ui-floating): add notice about the resolved jquery-ui issue
1 parent eed43fb commit a258424

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ The suggested pattern is to use callbacks for emmiting events and altering the s
7575

7676
#### Floating
7777

78+
**Update**: Issue [~~7498~~](bugs.jqueryui.com/ticket/7498) was resolved in jquery-ui v1.11.4.
79+
Calling `angular.element('ui-sortable').sortable('refresh')` (use a more appropriate selector in your use case)
80+
should make jquery-ui-sortable recognize the position and orientation of the existing and any new items.
81+
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.
82+
**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.
83+
7884
To have a smooth horizontal-list reordering, jquery.ui.sortable needs to detect the orientation of the list.
7985
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).
8086
There is also a [known issue](bugs.jqueryui.com/ticket/7498) about initially empty horizontal lists.

0 commit comments

Comments
 (0)