R/dtedit_module.R

Defines functions dtedit_server dtedit_ui

Documented in dtedit_server dtedit_ui

#' Shiny UI Module version of DTedit
#'
#' @param id An ID string that corresponds with the ID used to call the module's
#'        server function.
#' @seealso DTedit::dtedit_server
#' @export
dtedit_ui <- function(id) {
	ns <- NS(id)
	uiOutput(ns(id))
}

#' Shiny Server Module version of DTedit
#'
#' @param id An ID string that corresponds with the ID used to call the module's
#'        UI function.
#' @param ... other parameters passed to [DTedit::dtedit].
#' @seealso DTedit::dtedit_ui
#' @export
dtedit_server <- function(id, ...) {
	shiny::moduleServer(
		id,
		function(input, output, session) {
			return(dtedit(input = input,
						  output = output,
						  name = id,
						  id = id,
						  ...))
		}
	)
}
jbryer/DTedit documentation built on Oct. 22, 2022, 8:36 a.m.