mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 09:14:49 +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) {
|
||||
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
|
||||
moveComponentField(pathToComponentArray, dragIndex, hoverIndex);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user