Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-set city/township selectinput box when county is cleared #19

Open
ashleyasmus opened this issue May 11, 2022 · 0 comments
Open

re-set city/township selectinput box when county is cleared #19

ashleyasmus opened this issue May 11, 2022 · 0 comments
Labels
wontfix This will not be worked on

Comments

@ashleyasmus
Copy link

maybe I need to turn off "ignoreNULL" in this part of mod_filters_oneway.R?

    observeEvent(input$oneway_input_counties,
                 {
                   if (!is.null(input$oneway_input_counties))
                   {
                     filtered_cities <- tbi_tables$hh %>%
                       dplyr::filter(hh_county %in% input$oneway_input_counties) %>%
                       dplyr::select(hh_city) %>%
                       unique() %>%
                       na.omit()

                     updateSelectInput(
                       session = session,
                       inputId = "oneway_input_cities",
                       label = "Household City/Township",
                       choices = filtered_cities$hh_city,
                       selected = NULL
                     )
                   } else {
                     selectInput(
                       session = session,
                       inputId = ns("oneway_input_cities"),
                       "Household City/Township",
                       choices = unique(na.omit(tbi_tables$hh$hh_city)),
                       selected = NULL)
                   }},
                 ignoreInit = TRUE
    )
@ashleyasmus ashleyasmus added the bug Something isn't working label May 11, 2022
@ashleyasmus ashleyasmus added wontfix This will not be worked on and removed bug Something isn't working labels May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant