From 72f94168345f2759dcfddd5f330682a81f5847ce Mon Sep 17 00:00:00 2001 From: "Zhao, Junlue {MDBE~SOUTH SAN FRANCISCO}" Date: Wed, 30 Jun 2021 09:45:36 -0500 Subject: [PATCH] added action button to prevent re-render upon incomplete inputs (#249) * added action button to prevent re-render upon incomplete inputs * used debounce * Update NEWS.md * Update R/tm_g_swimlane.R Co-Authored-By: Pagacz, Konrad {FIEV~Warsaw} * Update R/tm_g_swimlane.R * Update R/tm_g_swimlane.R * Update R/tm_g_swimlane.R * Update NEWS.md Co-authored-by: Junlue Zhao Co-authored-by: Pagacz, Konrad {FIEV~Warsaw} --- NEWS.md | 3 +++ R/tm_g_swimlane.R | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e1fa7656..ded3a102 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # teal.osprey 0.1.10 +### Enhancements +* Added a Shiny feature to `tm_g_swimlane` that will prevent needless re-render of the output when the user has not completely provided inputs to the vertical lines widget. + ### Miscellaneous * Altered the `Choose Up To 2:` inputs widget from the Encoding Panel to be independent of the Filtering Panel in `tm_g_butterfly`. * Updated warning message when Tumor Burden Parameter is not selected in `tm_g_waterfall`. diff --git a/R/tm_g_swimlane.R b/R/tm_g_swimlane.R index cd0f5ee1..06a14a15 100644 --- a/R/tm_g_swimlane.R +++ b/R/tm_g_swimlane.R @@ -309,7 +309,7 @@ srv_g_swimlane <- function(input, output, session, datasets, dataname, anno_txt_var <- input$anno_txt_var # If reference lines are requested - vref_line <- as_numeric_from_comma_sep_str(input$vref_line) + vref_line <- as_numeric_from_comma_sep_str(debounce(reactive(input$vref_line), 1500)()) validate(need(all(!is.na(vref_line)), "Please enter a comma separated set of numeric values for the reference line(s)"))