Przeglądaj źródła

Update .getValue() - replace FIXME with el.value

shiny-input
Garrick Aden-Buie 6 lat temu
rodzic
commit
85205fbcbb
2 zmienionych plików z 5 dodań i 2 usunięć
  1. +4
    -0
      inst/shiny-input-app/dev-shiny-input.Rmd
  2. +1
    -2
      inst/shiny-input-app/typing.js

+ 4
- 0
inst/shiny-input-app/dev-shiny-input.Rmd Wyświetl plik

The input binding JavaScript for `checkboxInput()` is available The input binding JavaScript for `checkboxInput()` is available
in the [Shiny GitHub repository][checkboxInput-shiny-input-binding]. in the [Shiny GitHub repository][checkboxInput-shiny-input-binding].
Read through it and discuss what each method does. Read through it and discuss what each method does.

## Setup our input binding

Now it's time to setup our input binding. Replace `FIXME` with `el.value`.

+ 1
- 2
inst/shiny-input-app/typing.js Wyświetl plik

// your input. In this function, find or construct the value that will be // your input. In this function, find or construct the value that will be
// returned to Shiny. The ID of `el` is used for the inputId. // returned to Shiny. The ID of `el` is used for the inputId.


// e.g: return el.value
return 'FIXME';
return el.value;
}, },
setValue: function(el, value) { setValue: function(el, value) {
// This method is used for restoring the bookmarked state of your input // This method is used for restoring the bookmarked state of your input

Ładowanie…
Anuluj
Zapisz