-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add onstart callback fetaure #182
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for vue-draggable-plus ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This asynchronous behavior may lead to the correct value not being obtained if the promise has not been resolved when the update is triggered. |
Yes. I've updated this method to use Promise. resolve to ensure the return value is as expected |
If it's asynchronous, then no other events should be triggered before the promise is resolved. If that's the case, it could cause the view to be blocked, which I personally think is not a reasonable requirement. |
Yes. Asynchronous may cause render to be blocked(maybe blocked to be wanted really?). We can also render page by asynchronous data after the element is placed, but it will cause rendered twice. Is it bad? so I want to solve it on start. In fact, delayed rendering after dragging (may need to be combined with remote data for page rendering, may require the user to input again for confirmation, etc.) is also a normal requirement. For example
|
In the onStart method, you may need to interrupt dragging or placing elements, or rendering and placing elements requires obtaining data from the terminal, so the following is added: