Fix drop overlay with single rowed grids
This commit is contained in:
parent
db460b2a4a
commit
f496adae1d
@ -43,11 +43,10 @@ function Sortable({ id, children }) {
|
|||||||
borderWidth: "4px",
|
borderWidth: "4px",
|
||||||
borderRadius: "4px",
|
borderRadius: "4px",
|
||||||
borderStyle: over?.id === `__group__${id}` ? "solid" : "none",
|
borderStyle: over?.id === `__group__${id}` ? "solid" : "none",
|
||||||
pointerEvents: "none",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box style={{ position: "relative" }}>
|
<Box sx={{ position: "relative" }}>
|
||||||
<Box
|
<Box
|
||||||
ref={setDraggableNodeRef}
|
ref={setDraggableNodeRef}
|
||||||
style={dragStyle}
|
style={dragStyle}
|
||||||
@ -56,6 +55,16 @@ function Sortable({ id, children }) {
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: 0,
|
||||||
|
paddingTop: "100%",
|
||||||
|
pointerEvents: "none",
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Box ref={setDroppableNodeRef} style={sortDropStyle} bg="primary" />
|
<Box ref={setDroppableNodeRef} style={sortDropStyle} bg="primary" />
|
||||||
<Box
|
<Box
|
||||||
ref={setGroupNodeRef}
|
ref={setGroupNodeRef}
|
||||||
@ -63,6 +72,7 @@ function Sortable({ id, children }) {
|
|||||||
sx={{ borderColor: "primary" }}
|
sx={{ borderColor: "primary" }}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user