Change selection from drop down
This commit is contained in:
@@ -131,9 +131,23 @@ server <- function(input, output, session){
|
||||
updateSelectInput(
|
||||
session,
|
||||
inputId = "drp_stadtteil",
|
||||
choices = sel_stadtteile,
|
||||
selected = sel_stadtteile[1]
|
||||
choices = sort(sel_stadtteile),
|
||||
selected = selected_stadtteil,
|
||||
)
|
||||
currently_selected_bezirk <<- sel_bezirk
|
||||
currently_selected_stadtteil <<- selected_stadtteil
|
||||
update_selection_text(output)
|
||||
update_selection_table(output)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
observeEvent(input$drp_stadtteil, {
|
||||
sel_stadtteil <- input$drp_stadtteil
|
||||
if (sel_stadtteil != "") {
|
||||
currently_selected_stadtteil <<- sel_stadtteil
|
||||
update_selection_text(output)
|
||||
update_selection_table(output)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -162,7 +176,7 @@ server <- function(input, output, session){
|
||||
rest_of_name <- get_map_layer_name(clicked_polygon_id)
|
||||
if (prefix == "bez_") {
|
||||
currently_selected_bezirk <<- rest_of_name
|
||||
currently_selected_stadtteil <<- "Alle"
|
||||
currently_selected_stadtteil <<- paste("Bezirk", rest_of_name)
|
||||
}
|
||||
if(prefix == "std_") {
|
||||
currently_selected_bezirk <<- get_bezirk_by_stadtteil(rest_of_name)
|
||||
|
||||
Reference in New Issue
Block a user