Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select no items with an updateSelectinput in shiny?

Tags:

shiny

I have a selectizeInput and some action links to make it easier to select certain subgroups. I'd like to have one action link which deselects all values (to make it easier to choose just one item for example -- deselect them all and then the user picks one). The code:

updateSelectizeInput(session, "selectizeList", selected = NULL)

doesn't work, which is by design as the help for updateSelectizeInput (http://shiny.rstudio.com/reference/shiny/latest/updateSelectInput.html) states:

Any arguments with NULL values will be ignored; they will not result in any changes to the input object on the client.

Given that this is a feature, how can I unselect all values?

like image 658
Alexis Avatar asked Mar 06 '16 11:03

Alexis


Video Answer


1 Answers

I did

updateSelectInput(session, "selectizeList", selected = '')

and it seems to be working for me

like image 109
FortuneFaded Avatar answered Sep 28 '22 10:09

FortuneFaded