Skip to content

Commit

Permalink
fully qualify shiny function calls and document change
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulC91 committed Feb 29, 2024
1 parent 7873f94 commit 3c63399
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Suggests:
knitr,
rmarkdown,
covr
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
URL: https://github.com/paulc91/shinyauthr
BugReports: https://github.com/paulc91/shinyauthr/issues
Config/testthat/edition: 3
7 changes: 4 additions & 3 deletions R/login.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ loginUI <- function(id,
#' \href{https://shiny.rstudio.com/articles/modules.html}{Modularizing Shiny app code}.
#'
#' @param id An ID string that corresponds with the ID used to call the module's UI function
#' @param data data frame or tibble containing user names, passwords and other user data
#' @param data data frame or tibble containing user names, passwords and other user data. Can be either
#' a static object or a shiny \link[shiny]{reactive} object
#' @param user_col bare (unquoted) or quoted column name containing user names
#' @param pwd_col bare (unquoted) or quoted column name containing passwords
#' @param sodium_hashed have the passwords been hash encrypted using the sodium package? defaults to FALSE
Expand Down Expand Up @@ -121,9 +122,9 @@ loginServer <- function(id,
}
}

data_reactive <- reactive({
data_reactive <- shiny::reactive({
# if not already reactive, make data reactive
data_temp <- if(is.reactive(data)) data else reactive(data)
data_temp <- if (shiny::is.reactive(data)) data else shiny::reactive(data)
# ensure all text columns are character class
dplyr::mutate_if(data_temp(), is.factor, as.character)
})
Expand Down
3 changes: 2 additions & 1 deletion man/loginServer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c63399

Please sign in to comment.