I would like to insert pickerInputs from shinyWidgets in a DT datatable in a Shiny app. However, the liveSearch option is not working for me when rendered inside a datatable. Also, when I have a separate pickerInput outside of the datatable (uncomment the pickerInput line inside fluidPage() below), the pickerInputs inside the table do not render. I would appreciate help getting this to work.
library(shiny)
library(DT)
library(shinyWidgets)
shinyApp(
ui = fluidPage(
# pickerInput(inputId = "test", label = "Test", choices = c("option1", "option2")),
DT::dataTableOutput("mytable")
),
server = function(input, output, session) {
df <- data.frame(
col1 = as.character(pickerInput(
inputId = "Picker",
choices = c("option1", "option2", "option3", "zebra"),
options = pickerOptions(liveSearch = T)
))
)
output$mytable <- DT::renderDataTable({
DT::datatable(
data = df,
escape = F
)
})
}
)