I have RShiny code, with which i want to disable/enable number input with checkbox. However, it works only for disable. How could i fix that?
library(shiny)
runApp(shinyApp(
ui = fluidPage(
shinyjs::useShinyjs(),
numericInput("test", "Test", 5),
checkboxInput("submit", label="Choose")
),
server = function(input, output, session) {
observeEvent(input$submit, {
shinyjs::disable("test")
})
}
))
Aucun commentaire:
Enregistrer un commentaire