From f178f9ba6cb308b53c5e6371c0126a0e7a6e1e22 Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Sat, 7 Oct 2017 02:55:30 +0300 Subject: [PATCH] fix(setPosition): rawPosition never getting updated when setPosition was called (#2006) * Fix setPosition issue The rawPositions were never updated from using setPosition, now they are. * Fix bubbling issue Also, yes. It took me 8 hours to get back home. Deal with it :D * Watch your copy paste --- src/util/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Util.js b/src/util/Util.js index 2d6f87cb7..67a92d21d 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -306,7 +306,7 @@ class Util { let updatedItems = sorted.array(); Util.moveElementInArray(updatedItems, item, position, relative); updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i })); - return route.patch({ data: updatedItems, reason }); + return route.patch({ data: updatedItems, reason }).then(() => updatedItems); } static basename(path, ext) {