[StimulusBundle] Outlets containing namespace do not work
The stimulus_controller twig function accepts an array of outlets as its last argument. The outlet identifier has to match with the identifier of Stimulus controller. However if this outlet identifier contains a namespace (delimited with double dash) the resulting data attribute of this outlet is incorrect - the double dash is replaced with only one dash and therefore such outlet does not work.
Example (inside a twig template):
{{ stimulus_controller('admin--form', [], [], {'admin--form-button': '.form-button-class'}) }}
Expected data attribute for outlet:
data-admin--form-admin--form-button-outlet=".form-button-class"
Real data attribute for outlet:
data-admin--form-admin-form-button-outlet=".form-button-class"
(note the missing double dash in the outlet identifier)
Hi @pavel-kolar !
Sorry for the late answer.
Can you try with admin/form-button and admin/formButton ? I think one of them should work
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly reminder that this issue exists. If I don't hear anything I'll close this.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Hello? This issue is about to be closed if nobody replies.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?