Skip to contents

Visit the documentation at https://mui.com/api/Autocomplete/ for more information.

Visit the documentation at https://mui.com/api/Autocomplete/ for more information.

Usage

Autocomplete.shinyInput(inputId, ..., value = defaultValue)

Autocomplete.shinyInput(inputId, ..., value = defaultValue)

Arguments

inputId

the shiny input id

...

args to pass to element

value

the default value of the element

Examples

library(shiny.mui)
library(shiny)



if (interactive()) {
  shinyApp(
    ui = div(
      Autocomplete.shinyInput(
        "text",
        options = list(
          list(
            label = "go",
            value = "go"
          ),
          list(label = "town")),
          multiple = T,
          filterSelectedOptions = T
        ),
      textOutput("textValue")
    ),
    server = function(input, output) {
      output$textValue <- renderText({
        paste(input$text, collapse = ",")
      })
    }
  )
}