Bookmarking gets a little tricky when you have inputs that depend on other dynamically created inputs.
In this example, selectInput Y gets rendered twice on page load. The first time is when it gets initialized with its bookmarked value, but no choices since input$X doesn't exist yet. When input$X does get initialized, selectInput Y renders again with choices, but no selected value since bookmarked state only gets restored once.
The quickest way out of this mess is make X a static input instead-
Thanks but I cannot make the first input static unfortunately, otherwise I would have
But now I understand the problem. Is there anyway I can "manually" extract the settings from the state that is passed by the URL and make a workaround specific for that input?
Sorry not to have replied earlier. This is perfect, thanks. I was looking for the state$input$*** part. I am nearly sure I tried to access it this way and failed but it might be cause I wasn't in the right context.