Skip to content

Commit

Permalink
fix: initial fix that prevents re-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Feb 27, 2024
1 parent c9f87bf commit 402abcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Bug fixes

* Outlier labels no longer appear out of bounds in `tm_a_regression`.
* Fixed a bug in `tm_outliers` when changing the selected variable would cause a popup.

### Miscellaneous

Expand Down
8 changes: 5 additions & 3 deletions R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ ui_outliers <- function(id, ...) {
)
),
br(), hr(),
uiOutput(ns("table_ui_wrap"))
uiOutput(ns("table_ui_wrap")),
DT::dataTableOutput(ns("table_ui"))
),
encoding = div(
### Reporter
Expand Down Expand Up @@ -1046,12 +1047,14 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,
expr = {
tab <- input$tabs
req(tab) # tab is NULL upon app launch, hence will crash without this statement
shiny::req(iv_r()$is_valid())
outlier_var <- as.vector(merged$anl_input_r()$columns_source$outlier_var)
categorical_var <- as.vector(merged$anl_input_r()$columns_source$categorical_var)

ANL_OUTLIER <- common_code_q()[["ANL_OUTLIER"]] # nolint: object_name.
ANL_OUTLIER_EXTENDED <- common_code_q()[["ANL_OUTLIER_EXTENDED"]] # nolint: object_name.
ANL <- common_code_q()[["ANL"]] # nolint: object_name.

plot_brush <- if (tab == "Boxplot") {
boxplot_r()
box_pws$brush()
Expand Down Expand Up @@ -1183,8 +1186,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,
multiple = TRUE
),
h4("Outlier Table"),
teal.widgets::get_dt_rows(session$ns("table_ui"), session$ns("table_ui_rows")),
DT::dataTableOutput(session$ns("table_ui"))
teal.widgets::get_dt_rows(session$ns("table_ui"), session$ns("table_ui_rows"))
)
})

Expand Down

0 comments on commit 402abcb

Please sign in to comment.