Skip to contents

Module server

Usage

kitems(id, path, autosave = TRUE, admin = FALSE, shortcut = FALSE)

Arguments

id

the id to be used for the module server instance

path

a path where data model and items will be stored

autosave

a logical whether the item auto save should be activated or not (default = TRUE)

admin

a logical indicating if the admin module server should be launched (default = FALSE)

shortcut

a logical should attribute shortcuts be computed when building the item form (default = FALSE)

Value

the module server returns a list of the references that are accessible outside the module. All except id & url are references to reactive values. list(id, url, items, data_model, filtered_items, selected_items, clicked_column, filter_date)

Details

If autosave is FALSE, the item_save function should be used to make the data persistent. To make the data model persistent, use saveRDS function. The file name should be consistent with the output of dm_name function used with id plus .rds extension.

When admin is FALSE, admin_widget will return an 'empty' layout (tabs with no content) dynamic_sidebar is not affected by this parameter. It is expected that those function will not be used when admin = FALSE.

Examples

if (FALSE) { # \dontrun{
kitems(id = "mydata", path = "path/to/my/data", autosave = TRUE)
} # }