Fix palette drag-and-drop not triggering AddModuleModal
DevicePalette's useDraggable was missing dragType: 'palette' in its data object. RackPlanner's handleDragStart and handleDragEnd both guard on dragType === 'palette' — without it the drag overlay never showed and the drop onto a slot was silently ignored. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ const ALL_TYPES: ModuleType[] = [
|
|||||||
function PaletteItem({ type }: { type: ModuleType }) {
|
function PaletteItem({ type }: { type: ModuleType }) {
|
||||||
const { attributes, listeners, setNodeRef, isDragging } = useDraggable({
|
const { attributes, listeners, setNodeRef, isDragging } = useDraggable({
|
||||||
id: `palette-${type}`,
|
id: `palette-${type}`,
|
||||||
data: { type },
|
data: { dragType: 'palette', type },
|
||||||
});
|
});
|
||||||
|
|
||||||
const colors = MODULE_TYPE_COLORS[type];
|
const colors = MODULE_TYPE_COLORS[type];
|
||||||
|
|||||||
Reference in New Issue
Block a user