fix: fixed deal dragging end
This commit is contained in:
@ -108,7 +108,8 @@ const useDnd = (props: Props) => {
|
||||
const getDropTarget = (
|
||||
overId: string | number,
|
||||
activeDealId: number,
|
||||
activeStatusId: number
|
||||
activeStatusId: number,
|
||||
isOnDragEnd: boolean = false
|
||||
) => {
|
||||
if (typeof overId === "string") {
|
||||
return {
|
||||
@ -120,7 +121,7 @@ const useDnd = (props: Props) => {
|
||||
const overDealId = Number(overId);
|
||||
const overStatusId = getStatusByDealId(overDealId)?.id;
|
||||
|
||||
if (!overStatusId || activeDealId === overDealId) {
|
||||
if (!overStatusId || (!isOnDragEnd && activeDealId === overDealId)) {
|
||||
return { overStatusId: undefined, newLexorank: undefined };
|
||||
}
|
||||
|
||||
@ -190,7 +191,8 @@ const useDnd = (props: Props) => {
|
||||
const { overStatusId, newLexorank } = getDropTarget(
|
||||
over.id,
|
||||
activeDealId,
|
||||
activeStatusId
|
||||
activeStatusId,
|
||||
true
|
||||
);
|
||||
if (!overStatusId) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user