title: How to check which base group is selected on leaflet map
body: <p>I have a leaflet map with a selection of base groups and overlay groups, when i use the code </p>
  
  <pre><code>input$mymap_group[1]
  </code></pre>
  
  <p>this only shows me the first of the overlay groups selected not the base group. 
  Is there a way to show the current selected base group?</p>
  
  <pre><code>library(shiny)
  library(leaflet)
  
  evar &lt;- c("SST", "SLA", "CHL", "Eddies NS", "Eddies EW", "NPP")
  groups &lt;- c("12323", "1232455","3443", "23","987", "566")
  
  ui &lt;- fluidPage(
    mainPanel(tags$style(type = "text/css", "#mymap {height: calc(100vh - 80px) !important;}"),
              uiOutput("group_selected"),
              leafletOutput("mymap"))
  )
  
  server &lt;- function(input, output, session) {
  
    output$group_selected &lt;- renderUI({ h2(input$mymap_groups[1]) })
  
      output$mymap &lt;- renderLeaflet({
        leaflet() %&gt;% addTiles() %&gt;% setView(lng = -20, lat = 14, zoom = 6) %&gt;% addLayersControl(baseGroups = evar, overlayGroups = groups)
      })
  
  }
  
  runApp(shinyApp(ui, server))
  </code></pre>