From f0dbb422f67a9a412b0ce9233b58058e60e10ae8 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 8 Nov 2015 13:13:01 +0000 Subject: [PATCH] update the actual target list, which may not be the same as the one we dropped on --- src/skins/vector/views/molecules/RoomTile.js | 4 ++-- src/skins/vector/views/organisms/RoomSubList.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/skins/vector/views/molecules/RoomTile.js b/src/skins/vector/views/molecules/RoomTile.js index da38cb0fad..471bd8a11f 100644 --- a/src/skins/vector/views/molecules/RoomTile.js +++ b/src/skins/vector/views/molecules/RoomTile.js @@ -58,13 +58,13 @@ var roomTileSource = { endDrag: function (props, monitor, component) { var item = monitor.getItem(); - var dropResult = monitor.getDropResult(); if (props.roomSubList.debug) console.log("roomTile endDrag for " + item.room.roomId + " with didDrop=" + monitor.didDrop()); props.room._dragging = false; if (monitor.didDrop()) { - monitor.getDropResult().component.forceUpdate(); // as we're not using state + if (props.roomSubList.debug) console.log("force updating component " + item.targetList.props.label); + item.targetList.forceUpdate(); // as we're not using state } if (monitor.didDrop() && item.targetList.props.editable) { diff --git a/src/skins/vector/views/organisms/RoomSubList.js b/src/skins/vector/views/organisms/RoomSubList.js index c627e9d70b..02078f1a43 100644 --- a/src/skins/vector/views/organisms/RoomSubList.js +++ b/src/skins/vector/views/organisms/RoomSubList.js @@ -31,7 +31,6 @@ var roomListTarget = { drop: function(props, monitor, component) { if (debug) console.log("dropped on sublist") - return { component: component }; }, hover: function(props, monitor, component) {