I use pickerInput
from shinyWidgets
and I would like to disable it. For this purpose, I used the function disable
form shinyjs
package but it's doesn't work. But when I use selectInput
it's work. This is my code :
library(shiny)
library(shinyjs)
library(shinyWidgets)
##### UI ####
header <- dashboardHeader()
sidebar <- dashboardSidebar()
body <- dashboardBody(
useShinyjs(),
pickerInput(
inputId = "somevalue",
label = "pickerInput",
choices = c("one", "two")
),
br(),
selectInput(inputId = "test", label = "selectInput",
choices = c("B", "C")
)
)
ui <- dashboardPage(header, sidebar, body)
##### SERVER ####
server <- function(session, input, output) {
shinyjs::disable("somevalue") # doesnt work
shinyjs::disable("test") # ok it's fine
}
shinyApp(ui, server)
How can we fix it ?
Some help would be appreciated