Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!