gp_add_slider: Adds a basic slider with a callback function to parent.

View source: R/add_slider.R

gp_add_sliderR Documentation

Adds a basic slider with a callback function to parent.

Description

At this moment, there is no strategy to manage parent <> child interaction between what is main component (Welcome) and children. React does have strong tools for this but geoplumber is still young.

Usage

gp_add_slider(
  min = 1L,
  max = 10L,
  step = 1L,
  js_on_change_function = "onChange={(sliderInput) => this.setState({sliderInput})}",
  to_vector = "NA"
)

Arguments

min

min to pass to the slider

max

max to pass to the slider

step

step changes for min & max

js_on_change_function

the function to run on React parent (Welcome). By default, ⁠onChange={(sliderInput) => this.setState({sliderInput})}⁠ sets the state of parent with value returned from the html input's onChange function.

to_vector

instead of reading default Welcome.js

Examples

## Not run: 
gp_add_slider()

## End(Not run)


ATFutures/geoplumber documentation built on July 4, 2023, 12:18 a.m.