Using R and Shiny, I am using the answer to this question as the basis of my code but will act as a good minimal reproducible example. But I would like my shiny app that uses a navlistPanel
to change to the next tabPanel
after the done button has been clicked, is this possible?
I think that using the id
argument and referencing it using input$id as it mentions on the documentation might work...but do not know how this is done. Any help would be much appreciated.
You need an observer expression connected to the action button.
Here is the code to be inserted in the server
part of your minimal example:
observe({
if (input$data_upload_done %% 2 == 0 ) {
updateTabsetPanel(session, "mynavlist", selected = "Data Upload")
} else {
updateTabsetPanel(session, "mynavlist", selected = "Data Check")
}
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With