-
Notifications
You must be signed in to change notification settings - Fork 3
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
Can't store values of dynamically generated inputs #8
Comments
Hi Andy! Thanks for using the package. And great question, this has actual come up before but I wasn't sure how much people want the feature. I planned to work on it this year, but was a bit busy with my other packages. Nonetheless, now I will begin work on this and get back to you soonest. My guess is that I should have some sort of solution by end of the weekend, but if not, do check back with me. |
A million thanks! This will be a game changer. |
Hi Andy, I have now worked on the feature and uploaded the draft to this repository. Take a look when you have time. Basically, update your package from this github repository [ Use the code like below using the dyn.inputs setupStorage(appId = "shinytest03", inputs = list("sel_color"), dyn.inputs = list("sel_month"), session = session) or simply setupStorage(appId = "shinytest03", dyn.inputs = list("sel_month"), session = session) additionally, i have created an example app in the shinyStorePlus examples folder |
Thanks Obi, that looks like a great solution. Unfortunately I'm not getting it to work. I updated the package from GH (and verify that it's loading v1.2 in my app.R with a I also published a test app on ShinyApps.io to see if it would work from my Android phone. Unfortunately the dynamically generated inputs still get reset when the page is reloaded. Below is the output from my
|
What? That's weird. I checked out the shiny app you published and its not saving either. It worked perfectly on my dev windows. Let me look into it to tomorrow. Between, did you clear your browser cache to make sure the javascript is loading properly? |
Thanks for checking. I did clear the browser cache, but to completely eliminate that possibility I just ran it on another laptop with a fresh installation of R and got the same result. Let me know if there are any other tests or trials I can do. |
Hey, I just made a new update to the javascript. Reinstall and try it again this time. Let me know the results. |
Thanks - that did it! Both the hard coded and dynamically generated input values are retained when I reload the page, and even when I completely shut down and reopen the browser. I also updated the test app and that is working now also. Thank you for your perseverance on this! |
That's fantastic, Andy! Thanks for being patient. I will do one last check and this will be published soon in CRAN as well. |
Thanks for a fantastic package. I'm trying to use
shinyStorePlus
in an app where most of the ui (including inputs) is dynamically generated (because it has to be recreated whenever the user picks a different language).shinyStorePlus
stores the inputs that are created in the usual manner in the ui, but not dynamically generated inputs.Is there any way to get setupStorage to save the value of dynamically created inputs? I tried setting
outputs=TRUE
to no avail. Other ideas welcome.The text was updated successfully, but these errors were encountered: