- Clear stage (progress update), moving branches to verify some outputs.
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -8,6 +8,7 @@ import isEqual from "lodash/isEqual";
|
||||
import Lane from "./Lane";
|
||||
import { PopoverWrapper } from "react-popopo";
|
||||
import * as actions from "../../../redux/trello/trello.actions.js";
|
||||
import { isFunction } from "lodash";
|
||||
|
||||
/**
|
||||
* BoardContainer is a React component that represents a Trello-like board.
|
||||
@@ -234,11 +235,34 @@ const BoardContainer = ({
|
||||
]
|
||||
);
|
||||
|
||||
const onLaneDrag = ({ draggableId, type, source, reason, mode, destination, combine }) => {
|
||||
if (!type || type !== "lane" || !source || !destination) return;
|
||||
|
||||
dispatch(
|
||||
actions.moveCardAcrossLanes({
|
||||
fromLaneId: Number.parseInt(source.droppableId),
|
||||
toLaneId: Number.parseInt(destination.droppableId),
|
||||
cardId: draggableId,
|
||||
index: destination.index
|
||||
})
|
||||
);
|
||||
// onCardMoveAcrossLanes(payload.laneId, laneId, payload.id, addedIndex);
|
||||
};
|
||||
|
||||
const combinedDragEnd = (...params) => {
|
||||
// Early Gate
|
||||
if (!params || !params[0]) return;
|
||||
onLaneDrag(params[0]);
|
||||
if (isFunction(onDragEnd)) {
|
||||
onDragEnd(params[0]);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<components.BoardWrapper style={style} orientation={orientation} draggable={false}>
|
||||
<PopoverWrapper>
|
||||
<DragDropContext
|
||||
onDragEnd={onDragEnd}
|
||||
onDragEnd={combinedDragEnd}
|
||||
onDragUpdate={onDragUpdate}
|
||||
onDragStart={onDragStart}
|
||||
onBeforeDragStart={onBeforeDragStart}
|
||||
|
||||
Reference in New Issue
Block a user