module_nested_tabs {teal}R Documentation

Create a UI of nested tabs of teal_modules

Description

Create a UI of nested tabs of teal_modules

Usage

ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)

## Default S3 method:
ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)

## S3 method for class 'teal_modules'
ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)

## S3 method for class 'teal_module'
ui_nested_tabs(id, modules, datasets, depth = 0L, is_module_specific = FALSE)

srv_nested_tabs(
  id,
  datasets,
  modules,
  is_module_specific = FALSE,
  reporter = teal.reporter::Reporter$new()
)

## Default S3 method:
srv_nested_tabs(
  id,
  datasets,
  modules,
  is_module_specific = FALSE,
  reporter = teal.reporter::Reporter$new()
)

## S3 method for class 'teal_modules'
srv_nested_tabs(
  id,
  datasets,
  modules,
  is_module_specific = FALSE,
  reporter = teal.reporter::Reporter$new()
)

## S3 method for class 'teal_module'
srv_nested_tabs(
  id,
  datasets,
  modules,
  is_module_specific = TRUE,
  reporter = teal.reporter::Reporter$new()
)

Arguments

id

(character(1)) module id

modules

(teal_modules) object containing the output modules which will be displayed in the teal application. See modules() and module() for more details.

datasets

(named list of FilteredData) object to store filter state and filtered datasets, shared across modules. For more details see teal.slice::FilteredData. Structure of the list must be the same as structure of the modules argument and list names must correspond to the labels in modules. When filter is not module-specific then list contains the same object in all elements.

depth

(integer(1)) number which helps to determine depth of the modules nesting.

is_module_specific

(logical(1)) flag determining if the filter panel is global or module-specific. When set to TRUE, a filter panel is called inside of each module tab.

reporter

(Reporter) object from teal.reporter

Value

Depending on the class of modules, ui_nested_tabs returns:

srv_nested_tabs returns a reactive which returns the active module that corresponds to the selected tab.

ui_nested_tabs

Each teal_modules is translated to a tabsetPanel and each of its children is another tab-module called recursively. The UI of a teal_module is obtained by calling its UI function.

The datasets argument is required to resolve the teal arguments in an isolated context (with respect to reactivity).

srv_nested_tabs

This module recursively calls all elements of modules and returns currently active one.


[Package teal version 0.15.2 Index]