How to prevent the selectizeInput/pickerInput dropdown from closing by clicking outside in R Shiny?. Here is the sample code to explain the problem. I need to always see the selectizeInput choices even the user clicks the shiny body somewhere. The main selectizeInput dropdown should not close.
library(shiny)
library(shinyjs)
library(shinyWidgets)
ui <- fluidPage(
div(HTML("<br><br><br>")),
selectizeInput(
'upwardId', label = "Select Number", choices = 1:40,
options = list(maxItems = 20)
),
div(HTML("<br><br><br>")),
pickerInput(
inputId = "month",
label = "Select a month",
choices = c("Jan","Feb","March","Apr","May"),
multiple = TRUE,
options = pickerOptions(
maxOptions=3,
dropupAuto = FALSE,
actionsBox = TRUE,
title = "Please select a month",
header = "title..."
))
)
server <- function(input, output, session){}
shinyApp(ui, server)