Skip to content

Commit c8d6693

Browse files
m7prgithub-actions[bot]donyunardi
authored
Don't update distribution params labels when variable is deselected in tm_g_distribution (#891)
Fixes #510 --------- Signed-off-by: Marcin <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dony Unardi <[email protected]>
1 parent 13f2664 commit c8d6693

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/tm_g_distribution.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,13 @@ srv_distribution <- function(id,
595595
}
596596

597597
params_vals <- unname(params)
598-
params_names <- names(params)
598+
map_distr_nams <- list(
599+
normal = c("mean", "sd"),
600+
lognormal = c("meanlog", "sdlog"),
601+
gamma = c("shape", "rate"),
602+
unif = c("min", "max")
603+
)
604+
params_names <- map_distr_nams[[input$t_dist]] %||% names(params)
599605

600606
updateNumericInput(
601607
inputId = "dist_param1",

0 commit comments

Comments
 (0)