Skip to contents

Save options in settings pages

Usage

save_settings_options(
  output,
  r = shiny::reactiveValues(),
  id = character(),
  category = character(),
  code_id_input = integer(),
  data = data,
  i18n = character(),
  page_options = character()
)

Arguments

output

Shiny output variable

r

Shiny reactive value, used to communicate between modules (reactiveValue)

id

ID of the current page, format = "settings_[PAGE]" (character)

category

Category column in code table, eg : "dataset", "plugin" (character)

code_id_input

Input of the actionButton containing ID of current row, in datatable, format = "edit_code_[ID]" (character)

data

New data to store in options table (list)

i18n

Translator object from shiny.i18n library

page_options

Which options need to be saved (character)

Examples

if (FALSE) {
data <- list()
data$show_only_aggregated_data <- TRUE
data$users_allowed_read <- c(1, 3, 4)
save_settings_options(output = output, r = r, id = "settings_dataset", category = "dataset", code_id_input = "edit_code_3",
  data = data, i18n = i18n, page_options = c("show_only_aggregated_data", "users_allowed_read"))
}