Open airblade opened 1 year ago
Probably makes sense to add the action via an EventListener rather than markup?
Yes, I agree.
I quite liked just being able to set an attribute to add an event listener ;)
Still could, just use click->${this.identifier}#toggle
The controller adds some actions itself to avoid the user having to add them in their markup.
However these have the name of the controller hardcoded. For example:
https://github.com/airblade/stimulus-datepicker/blob/0c4defd2b9a7c9a637a8bdecaccdb9ac9d4e6e83/src/datepicker.js#L92
This means a child controller won't work properly.