Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
Error while calling method form stimulus controller

I'm trying to call a stimulus controller action when clicking a button. As I'm seeing, the scope is correct, also the name of the method, and the stimulus controller is actually well registered. Still, I'm getting this output from console. Any thoughts on what the error could be? (Also tried running yarn install and restarting the server but still not working)

enter image description here

<div data-controller="logs">
      <a class="button is-info is-outlined ml-2 mb-2" data-action="click->logs#displayGraph" data-logs-target="graph_button">Graph</a>
      <div data-logs-target="graph_visualization" class="is-hidden"><h1>GRAPH GOES HERE..</h1></div>
    </div>

Here is my stimulus controller...

    import { Controller } from "@hotwired/stimulus"
    
    // Connects to data-controller="logs"
    export default class extends Controller {
      static targets = ["graph_visualization", "graph_button" ]
    
      displayGraph() {
        this.graph_visualizationTarget.classList.toggle("is-hidden")
        this.graph_buttonTarget.classList.toggle("is-focused")
      }
   }
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Changed my process manager

I was using overmind s, to compile everything and open my project in localhost:5000.

But then, changed to rails s and seemed to worked good!

I'm guessing it has to do with how everything was being compiled, but does someone has a more specific explanation.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda