For teal modules we parameterize an optionalSliderInput with one argument
value_min_max
Source: R/optionalInput.R
optionalSliderInputValMinMax.Rd
The
optionalSliderInput() function needs three arguments to determine
whether to hide the sliderInput widget or not. For teal modules we specify an
optional slider input with one argument here called value_min_max.
Arguments
- inputId
The
inputslot that will be used to access the value.- label
Display label for the control, or
NULLfor no label.- value_min_max
(
numeric(1)ornumeric(3))
If of length 1 then the value gets set to that number and thesliderInputwill be hidden. Otherwise, if it is of length three the three elements will map tovalue,minandmaxof theoptionalSliderInput()function.- label_help
(
shiny.tag, optional)
an object of classshiny.tag. E.g. an object returned byshiny::helpText()- ...
optional arguments to
sliderInput
Examples
optionalSliderInputValMinMax("a", "b", 1)
#> <div class="form-group shiny-input-container shinyjs-hide">
#> <label class="control-label" id="a-label" for="a">b</label>
#> <input class="js-range-slider" id="a" data-skin="shiny" data-min="0" data-max="2" data-from="1" data-step="1" data-grid="true" data-grid-num="2" data-grid-snap="false" data-prettify-separator="," data-prettify-enabled="true" data-keyboard="true" data-data-type="number"/>
#> </div>
optionalSliderInputValMinMax("a", "b", c(3, 1, 5))
#> <div class="form-group shiny-input-container">
#> <label class="control-label" id="a-label" for="a">b</label>
#> <input class="js-range-slider" id="a" data-skin="shiny" data-min="1" data-max="5" data-from="3" data-step="1" data-grid="true" data-grid-num="4" data-grid-snap="false" data-prettify-separator="," data-prettify-enabled="true" data-keyboard="true" data-data-type="number"/>
#> </div>