As you can see below, I tried to write a code and it works quiet nicely. I tried to implement actionButtons to navigate between pages. All the actionButton works but not in the last page. I want it to navigate back to previous page and it doesnt do anything. I tried debugging a lot but couldnt find any problem. Maybe a new pair of eyes can find the problem in my code.
library(shiny)
library(shinythemes)
ui <- fluidPage(theme = shinytheme("sandstone"),
titlePanel("Automatic Evaluation"),
navbarPage("", id = "inTabset",
tabPanel(value = "panel0", icon("home"),
fluidRow(column(width=12, height=12,
br(),
p("Hello. This para is for description", strong("and also this"),
style="text-align:justify;
color:black;
background-color:lavender;
padding:12px;
border-radius:100px"),
actionButton('jumpToP1', 'Proceed')
))),
tabPanel(value = "panel1", title = "Process Selection",
p("Process Selection"),
br(),
br(),
actionButton('jumpToP0', 'BACK'),
actionButton('jumpToP2', 'NEXT')),
tabPanel(value = "panel2", title = "Modifying and Saving",
p("Modifying and Saving"),
br(),
br(),
actionButton('jumpToP1', 'BACK'))
))
server <- function(input, output, session) {
observeEvent(input$jumpToP0, {
updateTabsetPanel(session, "inTabset",
selected = "panel0")
})
observeEvent(input$jumpToP1, {
updateTabsetPanel(session, "inTabset",
selected = "panel1")
})
observeEvent(input$jumpToP2, {
updateTabsetPanel(session, "inTabset",
selected = "panel2")
})
}
shinyApp(ui, server)