@@ -930,6 +930,7 @@ srv_distribution <- function(id,
930930 input $ scales_type
931931 input $ qq_line
932932 is.null(input $ ggtheme )
933+ input $ tabs
933934 },
934935 valueExpr = {
935936 dist_var <- merge_vars()$ dist_var
@@ -938,13 +939,14 @@ srv_distribution <- function(id,
938939 dist_var_name <- merge_vars()$ dist_var_name
939940 s_var_name <- merge_vars()$ s_var_name
940941 g_var_name <- merge_vars()$ g_var_name
941- t_dist <- input $ t_dist
942942 dist_param1 <- input $ dist_param1
943943 dist_param2 <- input $ dist_param2
944944
945945 scales_type <- input $ scales_type
946946 ggtheme <- input $ ggtheme
947947
948+ teal :: validate_inputs(iv_r_dist(), iv_dist )
949+ t_dist <- req(input $ t_dist ) # Not validated when tab is not selected
948950 qenv <- common_q()
949951
950952 plot_call <- if (length(s_var ) == 0 && length(g_var ) == 0 ) {
@@ -990,7 +992,7 @@ srv_distribution <- function(id,
990992 plot_call <- substitute(
991993 expr = plot_call +
992994 stat_qq(distribution = mapped_dist , dparams = params ),
993- env = list (plot_call = plot_call , mapped_dist = as.name(unname(map_dist [req( t_dist ) ])))
995+ env = list (plot_call = plot_call , mapped_dist = as.name(unname(map_dist [t_dist ])))
994996 )
995997
996998 if (length(t_dist ) != 0 && length(g_var ) == 0 && length(s_var ) == 0 ) {
@@ -1267,7 +1269,6 @@ srv_distribution <- function(id,
12671269 })
12681270
12691271 qq_r <- reactive({
1270- teal :: validate_inputs(iv_r_dist(), iv_dist )
12711272 req(output_qq_q()) # Ensure original errors are displayed
12721273 decorated_output_qq_q()[[" plot" ]]
12731274 })
0 commit comments