title: How to update PickerInput following above input selections
body: <p>I can't seem to figure out how to update the PickerInput based on previous inputs for my map selection. It seems that if I make choices in a descending order it sorts and filters properly but when I try to make choices in a reverse order it does not filter correctly and will allow me to select an input that does not have data for the annual range, wilderness, species, or life stage.</p>
  <p>I have included the stripped down UI and server to show inputIds. Basically if a user selects a yearly range I want the wilderness input to update based on available wilderness for that year range selection. I then want the species to update based on wilderness and year range. Then finally I want the life stage of to update based on the year range, wilderness, and species available.</p>
  <p>I am close with what I currently have. I have noticed the life stages selection is not working correctly. Let me know if you see any issues how I approached the UI and Server. I am sorry I could not include the data as it contains sensitive species location</p>
  <p>UI</p>
  <pre><code>ui &lt;- fluidPage(
    
    
    
    
    #includeCSS(here(&quot;NPS_ShinyApp/theme.css&quot;)),
    
    theme = theme,
    
    
    titlePanel(&quot;&quot;),
    
    fluidPage(
      fluidRow(column(8,
                      h1(strong(&quot;National Park Service App - RIBBiTR &quot;)))),
    
    
    navbarPage(&quot;&quot;, inverse = T,
               
               tabPanel(&quot;Home&quot;, icon = icon(&quot;info-circle&quot;),
                        fluidPage(
                          fluidRow(
                            h1(strong(&quot;Disclaimer&quot;), style = &quot;font-size:20px;&quot;),
                            
                            column(12, p(&quot;&quot;))),
                          
                          fluidRow(
                            h1(strong(&quot;Intended Use&quot;),style = &quot;font-size:20px;&quot;),
                            
                            column(12, p(&quot;&quot;))),
                          
                          fluidRow(
                            h1(strong(&quot;Data Collection&quot;),style = &quot;font-size:20px;&quot;),
                            column(12, p(&quot;&quot;))))),
               
               
               tabPanel(title = &quot;Site Map&quot;, icon = icon(&quot;globe-asia&quot;),
                        
                        sidebarLayout(
                          
                          sidebarPanel(
                            
                            sliderInput(inputId = &quot;site_year&quot;,
                                        label = &quot;Select an annual range&quot;,
                                        min = 2005, max = 2021, 
                                        value =  c(2020, 2021),
                                        sep = &quot;&quot;),
                            
                            pickerInput(inputId = &quot;wilderness&quot;,
                                        label = &quot;Select a wilderness&quot;,
                                        choices = c(&quot;yosemite&quot;, &quot;goldent_trout&quot;, &quot;desolation&quot;), decreasing = T),
                                        multiple = F,
                                        selected = &quot;&quot;),
                            
                            pickerInput(inputId = &quot;species&quot;,
                                        label = &quot;Select a species&quot;,
                                        choices = c(&quot;buco&quot;, &quot;hyre&quot;, &quot;ramu&quot;),
                                        selected = &quot;&quot;,
                                        multiple = F),
                            pickerInput(inputId = &quot;stage&quot;,
                                        label = &quot;Select a life stage&quot;,
                                        choices = c(&quot;adult&quot;, &quot;juv&quot;, &quot;egg&quot;),
                                        selected = &quot;&quot;,
                                        multiple = F)),
                          
                          mainPanel(leafletOutput(outputId = &quot;site_map&quot;, width = 900, height = 500)))
                        
               )
               
               
               
               
    ))
  </code></pre>
  <p>Server</p>
  <pre><code># leaflet map with date, species, and site as reactive 
      output$site_map &lt;- renderLeaflet({
        
        
          leaflet() %&gt;% 
              addProviderTiles(&quot;Esri.WorldImagery&quot;) %&gt;% 
              addMouseCoordinates() %&gt;% 
              setView(lng = -119.36697, lat = 37.923288, zoom = 7) %&gt;% 
              addMeasure(
                  position = &quot;bottomleft&quot;,
                  primaryLengthUnit = &quot;feet&quot;,
                  primaryAreaUnit = &quot;sqfeet&quot;,
                  activeColor = &quot;#3D535D&quot;,
                  completedColor = &quot;#7D4479&quot;)
    })
  
  
      # observe events to update wilderness and years based on selection for leaflet map
      observeEvent(input$site_year, {
        
        updatePickerInput(session, inputId = &quot;wilderness&quot;, 
                          choices = unique(data$wilderness[data$date == input$site_year[1:2]]))
      })
      
      observeEvent(c(input$site_year, input$wilderness), ignoreInit = TRUE, {
        
        updatePickerInput(session, inputId = &quot;species&quot;, 
                            choices = unique(data$species[data$date == input$site_year[1:2] &amp; data$wilderness == input$wilderness]))
         
      })
      
      observeEvent(c(input$site_year, input$wilderness, input$species),ignoreInit = TRUE, {
        
        updatePickerInput(session, inputId = &quot;stage&quot;, 
                          choices = unique(data$visual_life_stage[data$date == input$site_year[1:2] &amp; data$wilderness == input$wilderness 
                                                                  &amp; data$species == input$species]))
     
      })
  </code></pre>
  <p>server</p>
  <pre><code>if (!require(librarian)){
    install.packages(&quot;librarian&quot;)
    library(librarian)
  }
  
  # librarian downloads, if not already downloaded, and reads in needed packages
  
  librarian::shelf(shiny, tidyverse, here, janitor, sf, lubridate, leaflet, shinyWidgets, leafem, bslib, thematic, shinymanager)
  
  # themeing
  theme &lt;- bs_theme(
    bg = &quot;#b2d1b9&quot;, # green background
    fg = &quot;#2d302e&quot;, # cream text foreground
    primary = &quot;#0417c2&quot;, # hyperlinks
    secondary = &quot;#506e57&quot;, # messages
    success = &quot;#506e57&quot;, # operation succeeded
    info = &quot;#506e57&quot;, # light blue from bar
    warning = &quot;#C3512C&quot;,# yellow
    danger = &quot;#FACE00&quot;, # orange red
    base_font = font_google(&quot;Open Sans&quot;), 
    heading_font = font_google(&quot;Source Sans Pro&quot;))
  </code></pre>