Building an R Shiny app with DataTable functionality. I'm expecting the user to select rows in many different (dynamically generated) tables, which live on different tabs. This works well - I just need to just use SelectRows on a dataTableProxy object.
However, I often need to e.g. load a predefined selection of rows. From what I've seen, SelectRows only works if the DT object has already been rendered, i.e. after the user has clicked the tab where it exists. Is there a way to force Shiny to create all my renderDataTable objects before user manually navigating to where they exist?
PS: For simple cases there is a simple fix by using
output$mytable = DT::renderDataTable(iris, selection = list(mode = 'multiple', selected = predefined_selection))
but in this specific case it gets very messy for equally specific reasons.
PPS: My first post on stackoverflow, sorry if this is poorly formulated.