Skip to content

Instantly share code, notes, and snippets.

@oganm
Created January 30, 2018 20:50
Show Gist options
  • Save oganm/96bf7927c2933466da98ff3bb2f926c0 to your computer and use it in GitHub Desktop.
Save oganm/96bf7927c2933466da98ff3bb2f926c0 to your computer and use it in GitHub Desktop.
Update progress bar check to try on windows
library(shiny)
library(shinyWidgets)
moduleUI = function(id){
ns = NS(id)
tagList(actionButton(inputId = ns('update'),label = 'update'),
progressBar(id = "progressBar", value = 50),
checkboxInput(inputId = ns('checkbox'),label = 'shinyCheckbox',value = FALSE))
}
moduleServer = function(input,output,session){
observeEvent(input$update,{
print("I'm being observed")
updateCheckboxInput(session,'checkbox',value = TRUE)
updateProgressBar(session = session, id = "progressBar", value = 100)
})
}
ui = fluidPage(
moduleUI(id = 'module')
)
server = function(input,output,session){
callModule(moduleServer,'module')
}
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment