select-group: Select Group Input Module

select-groupR Documentation

Select Group Input Module

Description

Group of mutually dependent select menus for filtering data.frame's columns (like in Excel).

Usage

select_group_ui(
  id,
  params,
  label = NULL,
  btn_reset_label = "Reset filters",
  inline = TRUE,
  vs_args = list()
)

select_group_server(id, data_r, vars_r)

Arguments

id

Module's id.

params

A list of parameters passed to each shinyWidgets::virtualSelectInput(), you can use :

  • inputId: mandatory, must correspond to variable name.

  • label: Display label for the control.

  • placeholder: Text to show when no options selected.

label

Character, global label on top of all labels.

btn_reset_label

Character, reset button label. If NULL no button is added.

inline

If TRUE (the default), select menus are horizontally positioned, otherwise vertically.

vs_args

Arguments passed to all shinyWidgets::virtualSelectInput() created.

data_r

Either a data.frame() or a shiny::reactive() function returning a data.frame (do not use parentheses).

vars_r

character, columns to use to create filters, must correspond to variables listed in params. Can be a shiny::reactive() function, but values must be included in the initial ones (in params).

Value

A shiny::reactive() function containing data filtered with an attribute inputs containing a named list of selected inputs.


finddx/shinyfind documentation built on May 28, 2024, 8:37 p.m.