tailwindcss-stimulus-components icon indicating copy to clipboard operation
tailwindcss-stimulus-components copied to clipboard

Extending Toggle only works on the connect action? Trying to add an accordion functionality.

Open jasper502 opened this issue 2 years ago • 1 comments

Staring with something as simple as this to confirm its working.

import { Toggle } from "tailwindcss-stimulus-components"

export default class extends Toggle {

  connect() {
    super.connect();
    console.log("Toggle Super")
  }

  toggle(event) {
    super.toggle(event);
    console.log("Toggle")
   }

}

The "Toggle Super" fires for each toggle group on my page. The toggles still work but the "Toggle" console action is not triggered. Trying to have an accordion functionality.

jasper502 avatar Mar 08 '22 20:03 jasper502

Have you found the issue?. Your code seems to be correct

rockwellll avatar Mar 12 '22 19:03 rockwellll