Comments (11)
Done. You can set the time after mouseleave with the slider_delay
argument.
from shinycustom.
I looked at this a bit, but don't think it's feasible. My JavaScript is not up to the task of getting the Ion Range Sliders to recognize and handle events like input or focusout.
But don't users expect sliders to work by only by changing position of the marker? They might be confused by a patient slider.
from shinycustom.
Yea I guess what I meant was that I was having issues with sliders selecting options while still selected with the mouse. It would be good to have it select input only after not clicking the mouse.
from shinycustom.
I'm not sure what you mean. Is there an example you can show me (maybe a shiny app online)?
from shinycustom.
https://beckmw.shinyapps.io/swmp_agg/
This app lets you select a date range using a slider. You'll notice that the plots update when you move the slider while it's still selected with the mouse. I'd like it to select the date only after it's not selected with the mouse, i.e., you select the slider, move it, unselect, then plot updates. It should not update anything in between the first and final selection.
from shinycustom.
Yes, I see now. Of course the way Shiny developers usually answered the questions of this sort is to suggest a constructing a "Submit" action button. You make all of your desired changes in through slider, checkboxes, etc., then press Submit. But I guess you've thought of that already.
I notice that the date-range slider updates only the plots, not the tables. Is that your intention?
from shinycustom.
I could add a 'submit' button but was hoping there was some work-around. I would prefer not having the extra step of clicking 'submit'. It's not a major issue and was just curious if you had any thoughts.
And thanks for the heads up on the tables, those should be updated with the sliders as well.
from shinycustom.
@fawda123 , check out the patientSlider branch of my repo:
devtools::install_github("homerhanumat/ShinyCustom", ref = "patientSlider")
I believe it will do essentially what you want. Shiny won't update the value from the slider until the "focusout" event occurs on the slider, e.g., the user clicks somewhere outside the slider. You still set the rate policies in the usual way (maybe slider_delay = 10 for near-immediate response to shift in focus).
from shinycustom.
Ah, just now saw your last comment. Maybe my workaround won't be what you want: changing focus with a mouse involves a click, so it might just as well be a click on a Submit button. Still, it was kinda fun figuring out how to get this behavior. And it would be just as easy to have the update occur on mouseleave, or a fixed time after mouseleave, or what-have-you ...
from shinycustom.
Hm that's halfway there. My worry with the focus out option is that users won't know that they have to click somewhere outside the slider for it to update. Can you set it so it updates on mouseleave? Or have an option for a fixed time after mouseleave? Thanks!!
from shinycustom.
That's perfect, thank you!
from shinycustom.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinycustom.