Skip to content
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

Slider callback_policy should work for apps #4540

Closed
bryevdv opened this issue Jun 16, 2016 · 11 comments

Comments

@bryevdv
Copy link
Member

commented Jun 16, 2016

Currently callback_policy only affects the triggering of JS callbacks, but it would be extremely useful to be able to throttle callbacks triggered on the server as well. It's possible that throttle mode is not very consistent with this, we might have to interpret throttle as mouseup for purposes of rate-limiting server updates.

@bill10

This comment has been minimized.

Copy link

commented Aug 7, 2016

+1 for this. I will be looking forward to this as I am running some expensive calculation.

@crashMOGWAI

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2016

👍 Just ran into this issue while working with the server and trying to filter large data sets via the sliders.

@bryevdv

This comment has been minimized.

Copy link
Member Author

commented Oct 10, 2016

There's a workable solution on stack overflow. Apologies, I can find it on a phone.

@crashMOGWAI

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2016

@sandipde

This comment has been minimized.

Copy link

commented Feb 16, 2018

Just ran into this issue. Is there any workaround for this. I want to have the slide.on_change event to occur at 'mouseup'.

@w4nderlust

This comment has been minimized.

Copy link

commented May 9, 2018

+1
Adding on_mouseup or something similar to sliders would be much appreciated, at the moment the on_change function is called more often than it can be computed in my project too.

@bryevdv

This comment has been minimized.

Copy link
Member Author

commented May 9, 2018

There is a serviceable workaround in the StackOverflow answer linked above

@w4nderlust

This comment has been minimized.

Copy link

commented May 9, 2018

@bryevdv thanks for pointing it out. I actually found it before this issue thread, and I consider it an ugly hack rather than a workaround :)

@bryevdv

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2018

@w4nderlust that sort of comment is neither useful nor appreciated. There is currently more work than people to do it, so if you can do better, great, pull requests are welcome.

@w4nderlust

This comment has been minimized.

Copy link

commented Jun 5, 2018

@bryevdv didn’t meant to offend anyone, sorry. My point was that I saw that before commenting on this thread and decided not to include it in my codebase, so having a working workaround didn’t really solve it for me (and doesn’t really solve the problem in general). I’ll gladly contribute if this was a python issue, unfortunately it is mostly a js callback one and on that side I can’t really help. No harm intended anyway, sorry again.

@bryevdv

This comment has been minimized.

Copy link
Member Author

commented May 12, 2019

I think there is actually a simple solution that could work, namely adding a new value_throttled property, that is only updated on the JS side according to the throttle policy. Then if users want throttles response they can perform slider.on_change('value_throttled', ...). This does place a slight burden on users to use a different property for throttled response, but the alternative is that this issue for a valuable capability just languishes indefinitely. [1] I'm definitely OK with this compromise with examples and directly linkable docs support.

[1] This ability to distinguish events via two properties would actually be a useful feature in some cases.

@bryevdv bryevdv referenced this issue May 14, 2019
3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.