mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): add dnd validation logic for multi-select board move
This commit is contained in:
parent
95838e5559
commit
16f48a816f
@ -53,8 +53,12 @@ export const isValidDrop = (
|
||||
}
|
||||
|
||||
if (payloadType === 'IMAGE_DTOS') {
|
||||
// TODO (multi-select)
|
||||
return true;
|
||||
// Assume all images are on the same board - this is true for the moment
|
||||
const { imageDTOs } = active.data.current.payload;
|
||||
const currentBoard = imageDTOs[0]?.board_id ?? 'none';
|
||||
const destinationBoard = overData.context.boardId;
|
||||
|
||||
return currentBoard !== destinationBoard;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -77,8 +81,11 @@ export const isValidDrop = (
|
||||
}
|
||||
|
||||
if (payloadType === 'IMAGE_DTOS') {
|
||||
// TODO (multi-select)
|
||||
return true;
|
||||
// Assume all images are on the same board - this is true for the moment
|
||||
const { imageDTOs } = active.data.current.payload;
|
||||
const currentBoard = imageDTOs[0]?.board_id ?? 'none';
|
||||
|
||||
return currentBoard !== 'none';
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user