Skip to content

Commit

Permalink
Ensure onDragMove is called for every move update.
Browse files Browse the repository at this point in the history
To do this, ensure that the relevant properties of the transform are
accessed to set up the effect reactivity correctly. Before, only the
top level transform object was accessed, but that is unchanging on move.
  • Loading branch information
martinpengellyphillips committed May 2, 2022
1 parent b5246c8 commit 1aca961
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [Unreleased]

### Fixed

- Ensure `onDragMove` is called for every move update (rather than just once).
To do this, ensure that the relevant properties of the transform are accessed
to set up the effect reactivity correctly. Before, only the top level
transform object was accessed, but that is unchanging on move.

## [0.6.0] - 2022-05-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/drag-drop-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ const DragDropProvider: Component<DragDropContextProps> = (passedProps) => {
createEffect(() => {
const draggable = activeDraggable();
if (draggable) {
draggable.transform;
Object.values(draggable.transform);
untrack(() => handler({ draggable }));
}
});
Expand Down

0 comments on commit 1aca961

Please sign in to comment.