Only run sortable handler if specified

This commit is contained in:
Ben Thomson 2019-04-09 10:52:14 +08:00
parent f49b5ab4b8
commit 744d578df7
1 changed files with 8 additions and 6 deletions

View File

@ -239,12 +239,14 @@
Repeater.prototype.onSortStop = function($item, container, callback, event) {
var endIndex = $item.index()
if (this.options.sortableHandler) {
this.$el.request(this.options.sortableHandler, {
data: {
_repeater_index: this.sortingStartIndex,
_repeater_new_index: endIndex
}
})
}
callback($item, container, callback, event)
}