Skip to content

Commit

Permalink
fix: reset of slider state on toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Oct 15, 2024
1 parent fec1599 commit 902fb40
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/toggleable_slider.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,8 @@ toggle_slider_server <- function(id, is_dichotomous_slider = TRUE, step_slider =
state_low$value <- state_low$value[[1]]
state_high$value <- state_high$value[[2]]
}
if (input$toggle %% 2 == 0) {
state_slider$max <- max(state_slider$max, state_slider$value[2])
state_slider$min <- min(state_slider$min, state_slider$value[1])
}
state_slider$max <- max(state_slider$max, state_slider$value[2])
state_slider$min <- min(state_slider$min, state_slider$value[1])
list(
low = state_low,
high = state_high,
Expand Down

0 comments on commit 902fb40

Please sign in to comment.