From 4d65727212d43bf6a44a37606ff6f856ff585aec Mon Sep 17 00:00:00 2001 From: Daniel Persson Date: Tue, 21 Jun 2016 08:35:36 +0200 Subject: [PATCH] Small change to update the data instead of the polymer collection. --- Sortable.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sortable.html b/Sortable.html index e6d6b6e..a60c9dc 100644 --- a/Sortable.html +++ b/Sortable.html @@ -78,7 +78,8 @@ this.sortable = Sortable.create(this, Object.assign(options, { onUpdate: e => { if (template) { - template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]) + template.items.splice(e.newIndex, 0, template.items.splice(e.oldIndex, 1)[0]); + //template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]) } this.fire("update", e) },