2

As a minimal example

# Basic usage
library("shiny")
library(shinyWidgets)

ui <- fluidPage(
  pickerInput(
    inputId = "somevalue",
    label = "A label",
    choices = c("apple", "orange", "mango", "pear"),
    options = list(
    `actions-box` = TRUE,
    `live-search` = TRUE,
    `selected-text-format`= "count",
    `count-selected-text` = "{0} choosen (on a total of {1})"),
    multiple = T
  ),
  verbatimTextOutput("value")
)

server <- function(input, output) {
  output$value <- renderPrint(input$somevalue)
}

shinyApp(ui, server)

Is there a way to copy and paste values into the search bar of pickerInput and return results that match?

for example, if I copy both lines below from a text file and I try to paste them inside the search bar, nothing is returned.

apple
mango

gif

Also, is it possible to print if the words did not match what's available from the list?

Edit 1: I have checked this question as suggested by Roman but this does not answer my question in this context. That question uses selectizeInput but I need to keep pickerInput for its functionalities.

Nick is tired
  • 6,860
  • 20
  • 39
  • 51
user324810
  • 597
  • 8
  • 20
  • Does this answer your question? [Copy and paste text in selectizeInput in a Shiny application](https://stackoverflow.com/questions/54744568/copy-and-paste-text-in-selectizeinput-in-a-shiny-application) – Roman Nov 16 '21 at 19:56
  • @Roman thanks but no. I actually have checked that question but it didn't really help as I needed the functionalities of `pickerInput` and that are `Select All` and `Deselect All`. – user324810 Nov 16 '21 at 22:57

0 Answers0