shinynotes {shinyNotes}R Documentation

Shiny notes module - server function

Description

Server function for the shinynotes module.

Usage

shinynotes(
  input,
  output,
  session,
  group_column,
  selected_group,
  group_options,
  table_id,
  db_conn,
  category_options = NA,
  style_options = default_styles()
)

Arguments

input

Standard shiny input

output

Standard shiny output

session

Standard shiny session

group_column

Column in table to group and filter notes by.

selected_group

Currently selected group column value.

group_options

Group column row value options.

table_id

Named list with member 'table' and 'schema' referring to a database table containing notes.

db_conn

An object that inherits from DBIConnection-class, typically generated by dbConnect()

category_options

Category column row value options. Useful if table is empty. Default is NA (retrieved from data)

style_options

Optional named list of CSS styles to apply to note panel elements.

Details

The style_options argument contains the following default values:

Value

Module server component. Reactive expression containing the currently selected note data and database connection.

Examples

if(interactive()){
  shiny::callModule(
    module = shinynotes,
    id = "paragraph",
    style_options = shiny::reactive({
    list(
      "type" = "bullets",
      "header" = list("color" = "#ccc"),
      "panel" = list("scrollY" = TRUE)
      )
    }),
    group_column = "package",
    selected_group = shiny::reactive("shiny"),
    group_options = c("shiny", "shinyWidgets", "dplyr"),
    table_id = list(table = "scroll_demo", schema = "notes"),
    db_conn = connect_sqlite(auto_disconnect = FALSE)
  )
}


[Package shinyNotes version 0.0.2 Index]