Skip to content

Commit

Permalink
1.1.5 - avoid onMoveArea if same location
Browse files Browse the repository at this point in the history
  • Loading branch information
KaWaite committed Sep 27, 2021
1 parent 186d406 commit b23e90c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-align",
"version": "1.1.4",
"version": "1.1.5",
"author": "KaWaite",
"module": "dist/realign.esm.js",
"license": "MIT",
Expand Down Expand Up @@ -77,4 +77,4 @@
"react-dnd": "^14.0.2",
"react-dnd-html5-backend": "^14.0.0"
}
}
}
2 changes: 1 addition & 1 deletion src/Grid/GridItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function GridItem<T = unknown>({
location: T;
} | null = monitor.getDropResult();

if (dropResults) {
if (dropResults && dropResults.location !== location) {
onMoveArea(item.id, dropResults.location, location);
}
},
Expand Down

0 comments on commit b23e90c

Please sign in to comment.