using DT, you can do some fancy stuff. Following is an example where the table lists all the options that contain the text you typed. If you click on a table cell, the text input is updated with the table cell's text. You can also use the search field of the table.
library(shiny)
shinyApp(
ui = fluidPage(textInput("text", "Please input text:"),
DT::dataTableOutput('tbl')),
server = function(session, input, output) {
# all your choices for the textfield go into "text" column
allData <- data.frame(ID = '', text = c(paste0("Text",1:50)))
# table with only the texts that contain input$text
output$tbl = DT::renderDataTable(
allData[grep(input$text, allData$text), ],
selection = 'none',
rownames = FALSE,
options = list(searchHighlight=T)
)
# fill textInput after Click in Table
observeEvent(input$tbl_cell_clicked, {
info <- input$tbl_cell_clicked
if (is.null(info$value) || info$col != 1) return()
else {
updateTextInput(session, "text", value = info$value)
}
})
}
)
selectize=FALSE
. So everybody is talking about different modes ofselectize
already. See gallery and reference – dracodoc