aoles / shinyURL

:link: Save and restore the state of Shiny app's widgets by encoding them in an URL query string
81 stars 21 forks source link

URL doesn't restore when selectInput with multiple = T is used #13

Open gedigerivijay opened 7 years ago

gedigerivijay commented 7 years ago

Hi,

I have a Shiny app with selectInput(multiple = TRUE). When I get the URL, I can see the multiple values for the select input in the URL. But, when I paste the URL into browser again, the restore won't happen. Everything gets reset to the original values.

I am rendering selectInput inside renderUI function. Is that the reason why the state is not restored? Every time the selectInput will be reloaded? The choices for selectInput are dynamic and based on the other input . So, its important that I put it in renderUI(). Can you please help me out here?

On the other hand, I have selectInput without multiple attribute and this is also rendered using renderUI function. The restore works perfectly fine with any value being selected in the select input.

Thanks.

aoles commented 7 years ago

I'm happy to look into it. To get me started, it would be great if you could share a minimal working example which I could run to reproduce the issue. Thanks!