teal
teal copied to clipboard
Simplify `module()` defaults
This is what I'm seeing in manual:
module(
label = "module",
server = function(id, ...) {
moduleServer(id, function(input, output, session) {
})
},
ui = function(id, ...) {
tags$p(paste0("This module has no UI (id: ", id, " )"))
},
filters,
datanames = "all",
server_args = NULL,
ui_args = NULL
)
modules(..., label = "root")
# S3 method for teal_module
format(x, indent = 0, ...)
# S3 method for teal_module
print(x, ...)
# S3 method for teal_modules
format(x, indent = 0, ...)
# S3 method for teal_modules
print(x, ...)
I think we can simplify the default ui and server arguments.
A proposal:
server = function(id, ...) {
moduleServer(id, function(input, output, session) NULL)
},
ui = function(id, ...) NULL,
I would even test it with the following:
server = function(id, ...) NULL,
ui = function(id, ...) NULL,