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
| axis | String |`y`| The axis you want to sort on, either 'x' or 'y' |
95
-
| lockAxis | String || If you'd like, you can lock movement to an axis while sorting. This is not something that is possible with HTML5 Drag & Drop |
96
-
| helperClass | String || You can provide a class you'd like to add to the sortable helper to add some styles to it |
97
-
| transitionDuration | Number |`300`| The duration of the transition when elements shift positions. Set this to `0` if you'd like to disable transitions |
98
-
| pressDelay | Number |`0`| If you'd like elements to only become sortable after being pressed for a certain time, change this property. A good sensible default value for mobile is `200`|
99
-
|onSortStart| Function || Callback that get's invoked when sorting begins. `function({node, index, collection}, event)`|
100
-
|onSortMove|Function || Callback that get's invoked during sorting as the cursor moves. `function(event)`|
101
-
|onSortEnd| Function || Callback that get's invoked when sortin ends. `function({oldIndex, newIndex, collection}, e)`|
102
-
|useDragHandle| Boolean |`false`| If you're using the `SortableHandle` HOC, set this to `true`|
103
-
|useWindowAsScrollContainer | Boolean |`false`| If you want, you can set the `window` as the scrolling container|
104
-
|hideSortableGhost| Boolean |`true`| Whether to auto-hide the ghost element. By default, as a convenience, React Sortable List will automatically hide the element that is currently being sorted. Set this to false if you would like to apply your own styling.|
105
-
|lockToContainerEdges | Boolean |`false`| You can lock movement of the sortable element to it's parent `SortableContainer`|
106
-
|lockOffset|`OffsetValue`\*\|[`OffsetValue`\*, `OffsetValue`\*]|`"50%"`| When `lockToContainerEdges` is set to `true`, this controls the offset distance between the sortable helper and the top/bottom edges of it's parent `SortableContainer`. Percentage values are relative to the height of the item currently being sorted. If you wish to specify different behaviours for locking to the *top* of the container vs the *bottom*, you may also pass in an `array` (For example: `["0%", "100%"]`).|
107
-
|getContainer | Function || Optional function to return the scrollable container element. This property defaults to the `SortableContainer` element itself or (if `useWindowAsScrollContainer` is true) the window. Use this function to specify a custom container object (eg this is useful for integrating with certain 3rd party components such as `FlexTable`). This function is passed a single parameter (the `wrappedInstance` React element) and it is expected to return a DOM element.|
108
-
109
-
\*`OffsetValue` is either a finite `Number`or a `String` made-up of a number and a unit (`px` or `%`).
| axis | String |`y`| The axis you want to sort on, either 'x' or 'y'|
95
+
| lockAxis | String || If you'd like, you can lock movement to an axis while sorting. This is not something that is possible with HTML5 Drag & Drop|
96
+
| helperClass | String || You can provide a class you'd like to add to the sortable helper to add some styles to it|
97
+
| transitionDuration | Number |`300`| The duration of the transition when elements shift positions. Set this to `0` if you'd like to disable transitions|
98
+
| pressDelay | Number |`0`| If you'd like elements to only become sortable after being pressed for a certain time, change this property. A good sensible default value for mobile is `200`. Cannot be used in conjunction with the `distance` prop. |
99
+
|distance| Number|`0`| If you'd like elements to only become sortable after being dragged a certain number of pixels. Cannot be used in conjunction with the `pressDelay` prop. |
100
+
|shouldCancelStart| Function|[Function](https://github.com/clauderic/react-sortable-hoc/blob/master/src/SortableContainer/index.js#L34)|This function get's invoked before sorting begins, and can be used to programatically cancel sorting before it begins. By default, it will cancel sorting if the event target is either an `input`, `textarea`, `select` or `option`. |
101
+
|onSortStart| Function || Callback that get's invoked when sorting begins. `function({node, index, collection}, event)`|
102
+
|onSortMove| Function || Callback that get's invoked during sorting as the cursor moves. `function(event)`|
103
+
|onSortEnd | Function || Callback that get's invoked when sorting ends. `function({oldIndex, newIndex, collection}, e)`|
104
+
|useDragHandle| Boolean |`false`| If you're using the `SortableHandle` HOC, set this to `true`|
105
+
|useWindowAsScrollContainer | Boolean|`false`| If you want, you can set the `window` as the scrolling container |
106
+
|hideSortableGhost| Boolean|`true`| Whether to auto-hide the ghost element. By default, as a convenience, React Sortable List will automatically hide the element that is currently being sorted. Set this to false if you would like to apply your own styling. |
107
+
|lockToContainerEdges | Boolean |`false`| You can lock movement of the sortable element to it's parent `SortableContainer`|
108
+
| lockOffset |`OffsetValue`\*\|[`OffsetValue`\*, `OffsetValue`\*]|`"50%"`| When `lockToContainerEdges` is set to `true`, this controls the offset distance between the sortable helper and the top/bottom edges of it's parent `SortableContainer`. Percentage values are relative to the height of the item currently being sorted. If you wish to specify different behaviours for locking to the *top* of the container vs the *bottom*, you may also pass in an `array` (For example: `["0%", "100%"]`). |
109
+
| getContainer | Function || Optional function to return the scrollable container element. This property defaults to the `SortableContainer` element itself or (if `useWindowAsScrollContainer` is true) the window. Use this function to specify a custom container object (eg this is useful for integrating with certain 3rd party components such as `FlexTable`). This function is passed a single parameter (the `wrappedInstance` React element) and it is expected to return a DOM element. |
110
+
111
111
\*`OffsetValue` can either be a finite `Number` or a `String` made up of a number and a unit (`px` or `%`).
112
112
Examples: `10` (which is the same as `"10px"`), `"50%"`
0 commit comments