Server function for the shinynotes
module.
shinynotes(
input,
output,
session,
group_column,
selected_group,
group_options,
table_id,
db_conn,
category_options = NA,
style_options = default_styles()
)
Standard shiny
input
Standard shiny
output
Standard shiny
session
Column in table to group and filter notes by.
Currently selected group column value.
Group column row value options.
Named list with member 'table' and 'schema' referring to a database table containing notes.
An object that inherits from
DBIConnection-class
, typically generated by
dbConnect()
Category column row value options. Useful if table is
empty. Default is NA
(retrieved from data)
Optional named list of CSS
styles to apply to
note panel elements.
Module server component. Reactive expression containing the currently selected note data and database connection.
The style_options
argument contains the following default
values:
type = "paragraph"
header
color = "#4b2c71"
style = "font-weight: bold; text-decoration: underline;"
panel
status = "default"
background = "#fdfeff"
scrollY = "scroll"
max_height = "600px"
height = "100
padding = "4px"
width = "100
border_width = "2px"
border_radius = "4px"
border_style = "solid"
border_color = "#f5f5f5"
style = "text-align:left; margin-right:1px;"
paragraph_style = "margin: 0px 0px 1px;white-space: pre-wrap;"
bullet_style = "white-space: pre-wrap;"
hr_style = "margin-top:10px; margin-bottom:10px;"
ignoreCase = TRUE
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)
)
}