Skip to content

Commit c35b038

Browse files
authored
Replace switchInput with input_switch (#883)
# Pull Request Part of insightsengineering/nestdevs-tasks#111 <details><summary>Example app:</summary> <p> ```r data <- teal_data() data <- within(data, { iris <- iris mtcars <- mtcars women <- women faithful <- faithful CO2 <- CO2 }) app <- init( data = data, modules = modules( tm_variable_browser( label = "Variable browser" ) ) ) if (interactive()) { shinyApp(app$ui, app$server) } ``` </p> </details>
1 parent 64e9ac7 commit c35b038

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

R/tm_variable_browser.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,11 @@ srv_variable_browser <- function(id,
387387
varname <- plot_var$variable[[dataname]]
388388
df <- data()[[dataname]]
389389

390-
numeric_ui <- shinyWidgets::switchInput(
391-
inputId = session$ns("remove_NA_hist"),
390+
numeric_ui <- bslib::input_switch(
391+
id = session$ns("remove_NA_hist"),
392392
label = "Remove NA values",
393393
value = FALSE,
394-
width = "50%",
395-
labelWidth = "100px",
396-
handleWidth = "50px"
394+
width = "100%"
397395
)
398396

399397
var <- df[[varname]]

0 commit comments

Comments
 (0)