update the actual target list, which may not be the same as the one we dropped on
This commit is contained in:
parent
5c406856ed
commit
f0dbb422f6
2 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue