Skip to content

Commit 61df172

Browse files
Update README.md
1 parent 87a5f52 commit 61df172

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,20 @@ Note that draggabe component can be used with a list prop
4545

4646
#### options
4747
Type: `Object`<br>
48-
Required: `true`
48+
Required: `false`
4949

5050
Option used to inicialize the sortable object see: [sortable option documentation](https://github.com/RubaXa/Sortable#options)<br>
5151
Note that all the method starting by "on" will be ignored as draggable component expose the same API via events.
5252

53-
#### Events
53+
#### clone
54+
Type: `Function`<br>
55+
Required: `false`<br>
56+
Default: `(original) => { return original;}`<br>
57+
58+
Function called on the source component to clone element when clone option is true. The unique argument is the viewModel element to be cloned and the returned value should be its cloned version.<br>
59+
By default vue.draggable reuse the viewmodel element, so you have to use this hook if you want to clone or deep clone it.
60+
61+
### Events
5462
`start`, `add`, `remove`, `update`, `end`, `choose`, `sort`, `filter`, `move`, `clone`<br>
5563
Called when there equivalent onStart, onAdd, .... are fired by Sortabe.js with the same argument.<br>
5664
[See here for reference](https://github.com/RubaXa/Sortable#event-object-demo)

0 commit comments

Comments
 (0)