-
Notifications
You must be signed in to change notification settings - Fork 6
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
Give us an event that returns the value while sliding #3
Comments
If you look at the source this is pretty easy to do (it's even nicely commented) Simply place this.emitRange(); inside the bottom of the update() method. You'll need to debounce it though as to not overwhelm the browser with events. |
Does that mean that I can retrieve the data from the event listener? Thanks for helping me out, I'm still pretty noob with JS. |
yes if you add that code to the update it will fire the event listener. but
it will fire so often and fast it will kill your ui. you need to debounce
it so it slows down. something like this might help you.
https://www.freecodecamp.org/news/javascript-debounce-example/
…On Mon, Feb 28, 2022 at 3:52 AM Teodor Anthony ***@***.***> wrote:
If you look at the source this is pretty easy to do (it's even nicely
commented)
Simply place this.emitRange(); inside the bottom of the update() method.
You'll need to debounce it though as to not overwhelm the browser with
events.
Does that mean that I can retrieve the data from the event listener?
The event listener doesn't seem to update while sliding. Only when the
sliding has stopped.
Thanks for helping me out, I'm still pretty noob with JS.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALJESPIYCQH37ONXS2VNP3U5NOWDANCNFSM5OZFOYPQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I don't seem to be able to do this, at least without breaking it. The reason I want to have this is to retrieve the current min and max and make my own label, so that I can prefix it with a currency symbol. It seems that I've just to forget this for now and come back to it later. Thank you so much for the debounce tutorial link. I definitely need to learn a lot more, and this certainly helps me! |
@Flexxkii I will close this as the label prefixes have been added here. As @digitalml mentioned the issue with firing this off so frequently is that it could potentially really hurt the performance of your UI. :) |
Hi, even if this issue has been closed, I believe the original request has not been addressed. I have created a PR that adds an optional attribute to emit the event while sliding, see #29. |
My skillsets aren't good enough to do it myself. I hope you're able to add an event that we can use to return the value while sliding.
I'm trying to make my own label this way.
The text was updated successfully, but these errors were encountered: