Problem is in the getFirstCollision function in utils.js.
A resizing object doesn't have the same dimensions as its previous incarnation, so it fails the strict equality check and reports a collision.
Potential solution: check if item indexes match; I'm not sure if these are usable as unique identifiers or not.
export function getFirstCollision(layout: Layout, layoutItem: LayoutItem): ?LayoutItem {
for (let i = 0, len = layout.length; i < len; i++) {
const indexMatches = layoutItem.i === layout[i].i;
const itemsCollide = collides(layout[i], layoutItem);
if (itemsCollide && !indexMatches) {
return layout[i];
}
}
}
I've created PR to fix this long time ago https://github.com/STRML/react-grid-layout/pull/656
Most helpful comment
I've created PR to fix this long time ago https://github.com/STRML/react-grid-layout/pull/656