excid3 / tailwindcss-stimulus-components

A set of StimulusJS components for TailwindCSS apps similar to Bootstrap JS components.

Home Page:https://excid3.github.io/tailwindcss-stimulus-components/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jasper502 opened this issue · 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.

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