Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda