Skip to content

Commit 202f712

Browse files
corrected add bug
1 parent 45040ab commit 202f712

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

dist/vuedraggable.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vuedraggable.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@
4343
}
4444

4545
function delegateAndEmit (evtName) {
46-
const ctx = this
47-
return function (evtData) {
48-
ctx['onDrag' + evtName].call(ctx, evtData)
49-
emit.call(ctx, evtName, evtData)
46+
return (evtData) => {
47+
this['onDrag' + evtName](evtData)
48+
emit.call(this, evtName, evtData)
5049
}
5150
}
5251

@@ -82,6 +81,10 @@
8281
this._sortable.destroy()
8382
},
8483

84+
updated () {
85+
this.computeIndexes()
86+
},
87+
8588
methods: {
8689

8790
computeIndexes () {

0 commit comments

Comments
 (0)