R/fct_custom_picker.R

Defines functions custom_picker_menu

#' custom_picker
#'
#' @description A wrapper around `shinyWidgets::pickerInput`
#' @param .id id for the input. Make sure its namespaced if inside module
#' @param .label a label for the input widget
#' @param .choices a list of options to pick
#' @param ... named arguments passed onto pickerInput
#'
#' @noRd
custom_picker_menu <- function(.id, .label, .choices, ...) {
  shinyWidgets::pickerInput(
    inputId = .id,
    label = .label,
    choices = .choices,
    ...,
    options = list(
      `live-search` = TRUE,
      `live-search-placeholder` = "Start typing",
      `live-search-normalize` = TRUE,
      `size` = 15,
      `selected-text-format` = "count > 4",
      `actions-box` = TRUE)
  )
}
teofiln/gene.editing.dash documentation built on Feb. 21, 2022, 12:59 a.m.