Sha256: 1896c66c964c509feae279c523df89f26ba6075e2bb05318ad0f44ef380a07a6

Contents?: true

Size: 1.19 KB

Versions: 13

Compression:

Stored size: 1.19 KB

Contents

import ApplicationController from './application_controller'

/* This is the custom StimulusReflex controller for <%= @name.classify %>Reflex.
 * Learn more at: https://docs.stimulusreflex.com
 */
export default class extends ApplicationController {
  /* Reflex specific lifecycle methods.
   * Use methods similar to this example to handle lifecycle concerns for a specific Reflex method.
   * Using the lifecycle is optional, so feel free to delete these stubs if you don't need them.
   *
   * Example:
   *
   *   <a href="#" data-reflex="<%= @name.classify %>Reflex#example">Example</a>
   *
   * Arguments:
   *
   *   element - the element that triggered the reflex
   *             may be different than the Stimulus controller's this.element
   *
   *   reflex - the name of the reflex e.g. "<%= @name.classify %>Reflex#example"
   *
   *   error - error message from the server
   */

  // beforeUpdate(element, reflex) {
  //  element.innerText = 'Updating...'
  // }

  // updateSuccess(element, reflex) {
  //   element.innerText = 'Updated Successfully.'
  // }

  // updateError(element, reflex, error) {
  //   console.error('updateError', error);
  //   element.innerText = 'Update Failed!'
  // }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
stimulus_reflex-3.1.4 lib/generators/templates/custom_controller.js
stimulus_reflex-3.1.3 lib/generators/templates/custom_controller.js
stimulus_reflex-3.1.2 lib/generators/templates/custom_controller.js
stimulus_reflex-3.0.0 lib/generators/templates/custom_controller.js
stimulus_reflex-2.2.3 lib/generators/templates/custom_controller.js
stimulus_reflex-2.2.2 lib/generators/templates/custom_controller.js
stimulus_reflex-2.2.1 lib/generators/templates/custom_controller.js
stimulus_reflex-2.2.0 lib/generators/templates/custom_controller.js
stimulus_reflex-2.1.9 lib/generators/templates/custom_controller.js
stimulus_reflex-2.1.8 lib/generators/templates/custom_controller.js
stimulus_reflex-2.1.7 lib/generators/templates/custom_controller.js
stimulus_reflex-2.1.6 lib/generators/templates/custom_controller.js
stimulus_reflex-2.1.5 lib/generators/templates/custom_controller.js