When I hide the dashboard sidebar, I need to call "redraw" on my igvShiny widget. As written, igv.js does not detect css class changes, so it does not resize itself automatically to take advantage of the new space created.
I have searched up and down, consulted the shinyjs docs, but nowhere have I found a way to detect the button click, or the changed width of the sidebar.
Any suggestions on how to programmatically detect the collapse icon click, or the resizing of the sidebar?
Thanks for the reply. Yes, indeed - just as you say - the current state is available in input$sidebarCollapsed. And the event can be detected like this:
observe({
state <- input$sidebarCollapsed
print(state)
})