unselected: Checks if the return value from a selectInput looks like it's...

View source: R/api-facile-internal.R

unselectedR Documentation

Checks if the return value from a selectInput looks like it's unselected

Description

Copied from FacileViz, but we don't want to depend on that.

Usage

unselected(value, ignore = c("---", "__initializing__", ""))

Arguments

value

The (character) object returned from a 'selectInput'

ignore

strings that are included in a select box that define a "not selected / active" state

Details

For some reason, sometimes a selectInput returns 'NULL' and other times it returns ‘""', so I’m just making this utility function to deal with that

NOTE: This is really a function that is used by shiny modules, but instead of having every shiny function check if something is "unselected" and setting it to NULL, we move that functionality in here so that internal vizualization functions can do that just once.

Value

a boolean flag used to indicate whether "this thing" has been set to a specific state by the user.


lianos/sparrow.shiny documentation built on Oct. 12, 2023, 2:43 a.m.