I have a pickerInput with an action box with default/selected to be all selected. This works completely as expected and wanted.
When I combine the pickerInput with observeEvent selected doesn't work and the default is nothing selected. The observeEvent filters the pickerInput list.
The pickerInput is
pickerInput("SchoolSelect",
label = "Select School:",
choices = c(ASData %>%
filter(!is.na(School)) %>%
select(School) %>%
unique() %>%
arrange(School)),
selected = ASData$School,
options = list('actions-box' = TRUE),
multiple = TRUE),
And the observeEvent
observeEvent(input$LASelect, {
updatePickerInput(session,
inputId = "SchoolSelect",
choices = c(ASData %>%
filter(!is.na(School), LA == input$LASelect, Year == input$YearSelect,
SchoolCount == '1') %>%
select(School) %>%
unique() %>%
arrange(School)))
Can anyone help? I've tried adding in:
selected = c(ASData %>%
filter(!is.na(School), LA == input$LASelect, Year == input$YearSelect,
SchoolCount == '1') %>%
select(School) %>%
unique() %>%
arrange(School)))
to the observeEvent but this also didn't work