title: How to get the current active tab in a Flexdashboard document to reactively display different UI
body: <p>I am currently trying to make a Flexdashboard shiny app. I want to be able to display different UI in my sidebar given which tab is active in my output zone.</p>
  <p>For this I considered using a <code>renderUI</code> and some basic conditions. But my problem is that I don't know how to get the active tab in flexdashboard. I have done some research but I wasn't able to find the info. I am not sure if we can add id to a tabset as in shiny and if it is possible, how to get the result corresponding to the id.</p>
  <p>Here is some skeleton code of what I would like to do :</p>
  <pre><code>---
  title: &quot;Test&quot;
  runtime: shiny
  output:
    flexdashboard::flex_dashboard:
      vertical_layout: scroll
  ---
  ```{r setup, include=FALSE}
  suppressPackageStartupMessages({
  library(shiny)
  library(flexdashboard)
  })
  ```
  
  
  # Page 1
  
  ## Input {.sidebar}
  
  ```{r}
  radioButtons(&quot;radio&quot;, label = h3(&quot;Radio buttons&quot;),
    choices = list(&quot;Choice 1&quot; = 1, &quot;Choice 2&quot; = 2, &quot;Choice 3&quot; = 3), 
    selected = 1)
  
  
  output$list1 &lt;- renderUI({
    if (tab == &quot;Tabs 1&quot;) {
      selectInput(&quot;select&quot;, label = h3(&quot;Select box&quot;), 
        choices = list(&quot;Choice 1&quot; = 1, &quot;Choice 2&quot; = 2, &quot;Choice 3&quot; = 3), 
        selected = 1)
    } 
    else {}
  })
  
  uiOutput(&quot;list1&quot;)
  ```
  
  Column {.tabset }
  -------------------------------------
  
  ### Tab 1
  
  ### Tab 2
  
  ### Tab 3
  </code></pre>
  <p>Thanks for your help :)</p>