title: R ShinyWidgets Embedded dropdownButton
body: <p>The <code>dropdownButton</code> function from <code>shinyWidgets</code> is great because I can use it to easily create Check / Uncheck all options in a <code>checkboxGroupInput</code> like <a href="https://stackoverflow.com/questions/34530142/drop-down-checkbox-input-in-shiny">this</a>. </p>
  
  <p>However, let's say I want to put two (or more) of these <code>dropdownButton</code>s together in another <code>dropdownButton</code>. I can't seem to make this work. Here is my attempt. (I am building the <code>ui</code> items within the <code>server.R</code> script because in my actual project, I need them to work that way.)</p>
  
  <pre><code>library(shiny)
  library(shinyWidgets)
  
  ui &lt;- fluidPage(
      titlePanel("Dropsdowns in your Dropdowns"),
      sidebarLayout(sidebarPanel(
          uiOutput("io_c1"),
          uiOutput("io_c2"),
          uiOutput("io_combine")
      ),
      mainPanel())
  )
  
  server &lt;- function(input, output, session) {
      ## drop down 1 items ##
      # drop down 1 choices
      c1 &lt;- checkboxGroupInput(
          inputId = "check1",
          label = "pick carb",
          choices = unique(mtcars$carb),
          selected = unique(mtcars$carb)
      )
  
      # select all / none drop down 1
      sa1 &lt;- actionButton(inputId = "c1_check_all",
                          label = "(un)select all")
  
      # set up observe on check box 1
      observeEvent(input$c1_check_all, {
          if (is.null(input$check1)) {
              updateCheckboxGroupInput(
                  session = session,
                  inputId = "check1",
                  selected = unique(mtcars$carb)
              )
          } else {
              updateCheckboxGroupInput(
                  session = session,
                  inputId = "check1",
                  selected = ""
              )
          }
      })
  
      # put all / none button and check box 1 into a dropdownbutton
      output$io_c1 &lt;- renderUI({
          dropdownButton(sa1,
                         c1,
                         circle = FALSE,
                         label = "Carbs",
                         status = "default")
      })
  
      ## drop down 2 items ##
      # drop down 2 choices
      c2 &lt;- checkboxGroupInput(
          inputId = "check2",
          label = "pick gear",
          choices = unique(mtcars$gear),
          selected = unique(mtcars$gear)
      )
  
      # select all / none drop down 2
      sa2 &lt;- actionButton(inputId = "c2_check_all",
                          label = "(un)select all")
  
      # set up observe on check box 2
      observeEvent(input$c2_check_all, {
          if (is.null(input$check2)) {
              updateCheckboxGroupInput(
                  session = session,
                  inputId = "check2",
                  selected = unique(mtcars$gear)
              )
          } else {
              updateCheckboxGroupInput(
                  session = session,
                  inputId = "check2",
                  selected = ""
              )
          }
      })
  
      # put all / none button and check box 2 into a dropdownbutton
      output$io_c2 &lt;- renderUI({
          dropdownButton(sa2,
                         c2,
                         circle = FALSE,
                         label = "Gears",
                         status = "default")
      })
  
      ## now try to make this all one thing ##
      d1 &lt;-  dropdownButton(sa1,
                            c1,
                            circle = FALSE,
                            label = "Carbs",
                            status = "default")
  
      d2 &lt;- dropdownButton(sa2,
                           c2,
                           circle = FALSE,
                           label = "Gears",
                           status = "default")
  
      output$io_combine &lt;-
          renderUI(dropdownButton(
              d1,
              d2,
              circle = FALSE,
              label = "Drop Downs Here",
              status = "default"
          ))
  
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>
  
  <p>So I got this working with each of the individual <code>dropdownButton</code>s , but when I try to put the results all together into one in that third part of the code, it does not work. The <code>dropdownButton</code> is created and the two separate <code>dropdownButton</code>s are in there, but they don't respond at all. Any ideas what I might be missing?</p>