Updating outputs when typing

subscribe listens to events defining Shiny to update the input value and make it available in the app.

For that purpose we need to define the event listeners to update the app.

  1. Use event keyup if you want to update after a key is released on the keyboard.
  2. Use event input if you want to update after copying and pasting any text in the input field or dictating text.
  3. The callback parameter ensures that the new value is captured by Shiny.
subscribe: function(el, callback) {
      $(el).on('keyup.customTextBinding input.customTextBinding', function(event) {
        callback(true);
      }
OSUICode::updateCustomTextInputExample(4)

Name convention used: EVENT_LISTENER.BINDING_NAME