Topic: Detecting order changes without saving every mouse movement
Lucy Palmer
asked 3 weeks ago
My sortable list needs one save after a completed drag. Listening to pointer movement produces too many requests.
What is the recommended completion hook for persisting order?
Igor Przybysz
staff pro premium priority answered 3 weeks ago
Do not save from pointer-move events. For a custom pointer-based integration, capture the starting card-ID sequence, then read the settled sequence after pointer release and save only if it changed. Account for cancellation and ignore temporary drag elements. Route keyboard or programmatic reordering through the same persistence function if your interface supports those paths.
Please share a short example of your sortable setup and the event handlers currently used to trigger saving. The documented item-move notification should not be treated as a once-per-completed-drag guarantee. With a reproduction, we can choose a reliable completion signal instead of adding requests during every intermediate movement.
https://mdbootstrap.com/docs/standard/plugins/drag-and-drop/
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 7.1.0
- Device: Laptop
- Browser: Chrome
- OS: Windows 11
- Provided sample code: No
- Provided link: No