Просмотр исходного кода

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

shiny-input
Garrick Aden-Buie 6 лет назад
Родитель
Сommit
85205fbcbb
2 измененных файлов: 5 добавлений и 2 удалений
  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 Просмотреть файл

@@ -317,3 +317,7 @@ your job is to tell Shiny a few key things:
The input binding JavaScript for `checkboxInput()` is available
in the [Shiny GitHub repository][checkboxInput-shiny-input-binding].
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 Просмотреть файл

@@ -16,8 +16,7 @@ $.extend(typingSpeed, {
// 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.

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

Загрузка…
Отмена
Сохранить