% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glass_multiselect.R
\name{glassMultiSelectValue}
\alias{glassMultiSelectValue}
\title{Reactive helpers for glassMultiSelect values}
\usage{
glassMultiSelectValue(input, inputId)
}
\arguments{
\item{input}{Shiny \code{input} object.}

\item{inputId}{Input id used in \code{\link[=glassMultiSelect]{glassMultiSelect()}}.}
}
\value{
A named list with two reactives:
\describe{
\item{\code{selected}}{Reactive character vector of selected values}
\item{\code{style}}{Reactive string for the active style}
}
}
\description{
Convenience helper for extracting a multi-select widget's value and style
from Shiny's \code{input} object without using modules.
}
\examples{
if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    useGlassTabs(),
    glassMultiSelect("cats", c(A = "a", B = "b", C = "c"))
  )

  server <- function(input, output, session) {
    ms <- glassMultiSelectValue(input, "cats")
    observe({
      message("Selected: ", paste(ms$selected(), collapse = ", "))
      message("Style: ", ms$style())
    })
  }

  shinyApp(ui, server)
}

}
