Skip to content

Commit 57ab5c9

Browse files
Updating documentation
1 parent dc7ed7d commit 57ab5c9

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ Alternative to the `value` prop, list is an array to be synchronized with drag-a
167167
The main difference is that `list` prop is updated by draggable component using splice method, whereas `value` is immutable.<br>
168168
**Do not use in conjunction with value prop.**
169169
170-
#### options
170+
#### options [deprecated]
171+
**Deprecated: use Sortable options as props; see [below section for more](#All-sortable-options)**
172+
171173
Type: `Object`<br>
172174
Required: `false`
173175
@@ -176,7 +178,29 @@ Note that all the method starting by "on" will be ignored as draggable component
176178
177179
As an example, a drag handle can be added using this binding `:options="{handle:'.handle'}"`. Read the linked documentation for other options available to you.
178180
179-
#### element
181+
#### All sortable options
182+
New in version 2.19
183+
184+
Sortable options can be set directly as vue.draggable props since version 2.19.
185+
186+
This means that all [sortable option](https://github.com/RubaXa/Sortable#options) are valid sortable props with the notable exception of all the method starting by "on" as draggable component expose the same API via events.
187+
188+
Example setting an handle and a group option:
189+
```HTML
190+
<draggable
191+
v-model="list"
192+
:group="{ name: 'people', pull: 'clone', put: false }"
193+
@change="log"
194+
>
195+
<!-- -->
196+
</draggable>
197+
```
198+
199+
#### element
200+
201+
**Deprecated as it has been renamed [tag](#tag)**
202+
203+
#### tag
180204
Type: `String`<br>
181205
Default: `'div'`
182206

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuedraggable",
3-
"version": "2.18.1",
3+
"version": "2.19.0",
44
"description": "draggable component for vue",
55
"main": "dist/vuedraggable.umd.min.js",
66
"private": false,

0 commit comments

Comments
 (0)