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

\item{inputId}{Input id used in \code{\link[=glassSelect]{glassSelect()}}.}
}
\value{
A reactive expression returning the current selected value as a
character scalar, or \code{NULL} when nothing is selected.
}
\description{
Convenience helper for extracting a single-select widget's value from Shiny's
\code{input} object without using modules.
}
\examples{
if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    useGlassTabs(),
    glassSelect("fruit", c(Apple = "apple", Banana = "banana"))
  )

  server <- function(input, output, session) {
    fruit <- glassSelectValue(input, "fruit")
    observe({
      print(fruit())
    })
  }

  shinyApp(ui, server)
}

}
