module_filter_manager {teal}R Documentation

Manage multiple FilteredData objects

Description

Oversee filter states across the entire application.

Usage

ui_filter_manager_panel(id)

srv_filter_manager_panel(id, slices_global)

ui_filter_manager(id)

srv_filter_manager(id, slices_global)

srv_module_filter_manager(id, module_fd, slices_global)

Arguments

id

(character(1)) shiny module instance id.

slices_global

(reactiveVal) containing teal_slices.

module_fd

(FilteredData) Object containing the data to be filtered in a single teal module.

Value

Module returns a slices_global (reactiveVal) containing a teal_slices object with mapping.

Slices global

The key role in maintaining the module-specific filter states is played by the .slicesGlobal object. It is a reference class that holds the following fields:

During a session only new filters are added to all_slices unless module_snapshot_manager is used to restore previous state. Filters from all_slices can be activated or deactivated in a module which is linked (both ways) by attr(, "mapping") so that:

Filter manager

Filter-manager is split into two parts:

  1. ui/srv_filter_manager_panel - Called once for the whole app. This module observes changes in the filters in slices_global and displays them in a table utilizing information from mapping:

  1. ui/srv_module_filter_manager - Called once for each teal_module. Handling filter states for of single module and keeping module FilteredData consistent with slices_global, so that local filters are always reflected in the slices_global and its mapping and vice versa.


[Package teal version 0.16.0 Index]