I'm using Shiny.setInputValue() to update a slider with a value from a parent site. That is working internally. But the visual representation of the slider gets no visual update. Is there an attribute I cann add to my Shiny.setInputValue() call that forces the update? Or a JavaScript command that updates the slider visually I can add afterwards?
A workaround might be defining a reactive value and change that instead and than using updateSliderInput() on the server code to update the slider. But this seems pritty cumbersome if we have multiple visual inputs (of different types). (I had a look on the table example.)
I wonder why a visual update is not the default case anyway.
After some hours of messing around with endless loops of back and foreward changing values I came up with a solution. The app can send the change of a value to its parent frame and values in the app can be changed from the parent window as well. The change is not only internally but the slider is adjusted as well.
I implemented it with a not shown input$change variable that gets set TRUE from JS in the window.addEventListener. This is recogniced by an observeEvent. There the slider gets updated. Then it sends a message to JS and input$change gets set FALSE again in the Shiny.addCustomMessageHandler function. This is necessary because the reaction time of the observer is lower than the execution in the JS code.
Have a look on my example of a parent frame embedding the app linked above: Parent Frame