-
Notifications
You must be signed in to change notification settings - Fork 10
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
Expose DragStart, DragAt and DragEnd Variants #15
Comments
Hi! That's an interesting use case. I think exposing the One alternative would be to return a "reply" from the update function when the values change. It could look something like Another option is for you to keep track of the last value in your model and diff it with the values coming from the slider. After every update, you could check the new values on the How does the second option sound to you? It's something like implementing a throttle based on the value changing. |
I guess I'm not fully following. How would one know when the drag event had ceased? On the second option, even if you keep track what distinguishes when you need to change the model. |
Ah! I'm sorry, I forgot how this worked! |
I'm building a UI that updates the url when the slider is updated. Currently it's hammering the history API and I'm getting an error in firefox that states
Too many calls to Location or History APIs within a short timeframe
and the ui freezes. It would be nice to have access to the sub messages (especiallyDragEnd
). All this requires is changing theMsg
toMsg(..)
in the module exposing statement.The user would still need to account for the generalized message handling so the example would look something like this
I'm sure the above can be refactored.
I've already cloned, updated and tested this (manually) and will have a PR soon.
The text was updated successfully, but these errors were encountered: