Add update() method to DragGesture to handle prop changes#3443
Add update() method to DragGesture to handle prop changes#3443mattgperry merged 1 commit intomainfrom
Conversation
The DragGesture class was missing an update() method that other gesture features (like PanGesture) implement. This meant that when props changed during a drag operation, the gesture feature wasn't notified. This fix adds the update() method which handles dragControls prop changes, ensuring that when the dragControls prop is updated, the old subscription is removed and a new one is created with the updated controls. Fixes #1185
Pull Request ReviewThank you for this PR! This is a well-targeted fix that addresses a real issue where DragGesture wasn't responding to prop changes. Here's my detailed review: ✅ Strengths
🔍 Code Quality ObservationsLogic Issue: Missing
|
The DragGesture class was missing an update() method that other gesture features (like PanGesture) implement. This meant that when props changed during a drag operation, the gesture feature wasn't notified.
This fix adds the update() method which handles dragControls prop changes, ensuring that when the dragControls prop is updated, the old subscription is removed and a new one is created with the updated controls.
Fixes #1185