selectizeInput() does not show first option when linked to updateSelecizeInput() and argument "multiple=TRUE"


#1

Hi!

I am new to R, RStudio and RShiny, and to posting in forums. Apologies if my format or style is not correct.

I am developping an RShiny app where - based on the selection made in Select Box 1 - choices of Select Box 2 are adjusted. It works just fine.
I would like to take this to the next level: after my user makes his choice from Box 1, he should be able to select multiple options from Box 2.
I added the argument “multiple=TRUE” for Box 2.
The functionality is there, options of Box 2 adjust in accordance with the selection of Box 1. However, Box 2 needs to be clicked on in order to see any of the options. Not even the arrow indicating it is a drop-down menu, is shown. Thus, not even the first option is visible.

I have read about the possibility to specify - via argument “selected” - what is displayed, but no matter where I apply it, it doesn’t seem to work for me.
I have two possible places: selectizeInput () and updateSelectizeInput().

In the end the idea is to guide the user intuitively towards having to select options in Box 1 first before moving on to Box 2, so ideally, I would like to

  • either see a change in options in Box 2 or
  • disable Box 2 until selection in Box 1 has been made.
    So if the problem of not seeing the options can be solved in a different way, so without “selected”, that is fine, because I don’t actually need the first option to be “selected” already.

Essentially, what I am trying to achieve is a combination of what can be seen in the example here. The first selectize option with the grey “Choose” instead of the last option with the empty choices. But with multiple selection.