Skip to content

Instantly share code, notes, and snippets.

@pvictor
Last active May 30, 2022 18:07
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvictor/ee154cc600e82f3ed2ce0a333bc7d015 to your computer and use it in GitHub Desktop.
Save pvictor/ee154cc600e82f3ed2ce0a333bc7d015 to your computer and use it in GitHub Desktop.
Add a remove button to each item of a selectize input
library(shiny)
ui <- fluidPage(
selectizeInput(
inputId = "select",
label = "Select",
choices = NULL,
multiple = TRUE,
options = list(
plugins = list("remove_button"),
create = TRUE,
persist = TRUE # keep created choices in dropdown
)
),
verbatimTextOutput("out")
)
server <- function(input, output){
output$out <- renderPrint({
input$select
})
}
shinyApp(ui, server)
@jdemello
Copy link

Thanks!

@sebdalgarno
Copy link

very useful! thanks

@przytu1
Copy link

przytu1 commented Aug 10, 2018

thanks 👍

@shahreyar-abeer
Copy link

I cannot emphasize how much this helped me!
Thanks a lot man.

@mdshw5
Copy link

mdshw5 commented Oct 22, 2020

Thanks!

@kennedymwavu
Copy link

Thanks a lot!

@mattapel
Copy link

So great, thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment