Skip to content

Commit

Permalink
clean up; add documentation to lock and unlock functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromiguelm committed Feb 28, 2024
1 parent fb15c46 commit ac541ed
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 10 deletions.
13 changes: 12 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#' @title Lock wizard
#'
#' Server-side function to lock the wizard.
#'
#' @param id wizard id
#' @param session shiny session
#' @export
lock <- function(
id,
Expand All @@ -6,7 +12,12 @@ lock <- function(
session$sendInputMessage(id, "lock")
}


#' @title Unlock wizard
#'
#' Server-side function to unlock the wizard.
#'
#' @param id wizard id
#' @param session shiny session
#' @export
unlock <- function(
id,
Expand Down
9 changes: 0 additions & 9 deletions inst/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ $.extend(wizard, {
},

setValue: function(el, value) {
// TODO: for this to actually work, I think we'd need to include all the
// wizard's configuration. This would be a lot better/easier if wizardJS
// offered a method specifically for updating the current step (instead of
// this hacky way of doing it via re-initialization)
//
// var w = this.initialize(el);
// w.update({"current_step": value});

// run lock function

if (value === "lock") {
this.lock();
Expand Down
20 changes: 20 additions & 0 deletions man/lock.Rd

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

20 changes: 20 additions & 0 deletions man/unlock.Rd

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

0 comments on commit ac541ed

Please sign in to comment.