R/module_group_edges.R

Defines functions server_group_edges ui_group_edges

#' @importFrom shinyhelper helper
ui_group_edges <- function(id) {
  ns <- NS(id)
  helper(
    selectInput(
      inputId = ns("group"),
      label = "Group edges by",
      choices = add_none(ag_data_group_labels),
      multiple = FALSE
    ),
    type = "markdown",
    content = "label_group"
  )
}

#' @importFrom purrr when
server_group_edges <- function(id) {
  moduleServer(id, function(input, output, session) {
    reactive({
      when(
        input[["group"]],
        . == ag_option("str_null") ~ "",
        ~ .
      )
    })
  })
}
KotulskaLab/AmyloGraph documentation built on June 30, 2023, 8:48 p.m.