Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes popup dialog that keeps appearing when variable is changed on tm_outliers #693

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()) # Same validation as output$table_ui_wrap
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
Loading