diff --git a/R/toggleable_slider.R b/R/toggleable_slider.R index a7e380a0..45419a15 100644 --- a/R/toggleable_slider.R +++ b/R/toggleable_slider.R @@ -177,10 +177,9 @@ toggle_slider_server <- function(id, is_dichotomous_slider = TRUE, step_slider = # only update provided components, do not discasrd others old_state <- cur_state() - if (is.null(old_state)) { - old_state <- new_state + if (!is.null(old_state)) { + new_state <- utils::modifyList(old_state, new_state) } - new_state <- utils::modifyList(old_state, new_state) if (!setequal(new_state, cur_state())) { cur_state(new_state)