mirror of
https://github.com/strapi/strapi.git
synced 2025-08-10 17:58:07 +00:00
Merge pull request #12504 from godzzo/godzzo/issue12498
Fixing Drag ordering bug with Nested Component.
This commit is contained in:
commit
dfdba4fc9d
@ -121,6 +121,10 @@ const DraggedItem = ({
|
|||||||
if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
|
if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// If They are not in the same level, should not move
|
||||||
|
if (dragPath.split('.').length !== hoverPath.split('.').length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Time to actually perform the action in the data
|
// Time to actually perform the action in the data
|
||||||
moveComponentField(pathToComponentArray, dragIndex, hoverIndex);
|
moveComponentField(pathToComponentArray, dragIndex, hoverIndex);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user