ModalWidget: ModalWidget

View source: R/Widget_ModalWidget.R

ModalWidgetR Documentation

ModalWidget

Description

Generic module for modal dialogs that are launched from a button.

Usage

ModalWidget(
  input,
  output,
  session,
  reactives = reactive({     fp = NULL }),
  static = list(tooltip = "Tooltip", title = "title", label = "label", icon =
    icon("bar-chart", lib = "font-awesome"), modalButtonLabel = "Cancel"),
  useActionLink = F,
  style = "color:#ffffff;padding:15px;border-left-width:0;border-right:1px solid #eee"
)

ModalWidgetUI(id)

Arguments

input

arguments necessary for use with callModule()

output

arguments necessary for use with callModule()

session

arguments necessary for use with callModule()

reactives

a reactive({}) returning a list with one element, fp, see details

static

a list of arguments that are not in a reactive context and hence do not change while the app is running.

useActionLink

if TRUE, will use an actionLink instead of an actionButton to open the modal Dialog

style

style settings to apply to the modal button

id

id to be used to define a namespace via NS() (must match id in callModule for the server Module)

Details

Because the UI elements of the modal dialog are passed in as reactives()$fp, they can be namespaced and easily accessed in the parent module that can then handle the input from the modal dialog.

reactives()$fp

Specify the UI elements of the modal dialog here

static
  • tooltip tooltip when hovering over the button

  • title title of the modal dialog

  • label label of the button opening the modal dialog

  • icon icon() of the button opening the modal dialog

Value

returns its internalValues

Functions

  • ModalWidget: Server logic

  • ModalWidgetUI: UI elements


mjhelf/Metaboseek documentation built on April 23, 2022, 12:09 p.m.