ux icon indicating copy to clipboard operation
ux copied to clipboard

[StimulusBundle] Outlets containing namespace do not work

Open pavel-kolar opened this issue 2 years ago • 4 comments

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)

pavel-kolar avatar Nov 22 '23 08:11 pavel-kolar

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

smnandre avatar Nov 27 '23 20:11 smnandre

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar May 28 '24 12:05 carsonbot

Friendly reminder that this issue exists. If I don't hear anything I'll close this.

carsonbot avatar Jun 11 '24 12:06 carsonbot

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!

carsonbot avatar Jun 25 '24 12:06 carsonbot

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Dec 26 '24 12:12 carsonbot

Hello? This issue is about to be closed if nobody replies.

carsonbot avatar Jan 09 '25 12:01 carsonbot

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!

carsonbot avatar Jan 23 '25 12:01 carsonbot

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Jul 24 '25 12:07 carsonbot