-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller over reflex attribute is ignore and reflex is always called with default StimulusReflexController #659
Comments
In our case the hotfix is creating a method in JS |
@julianrubisch Is this still an open topic or was this issue somehow addressed/fixed in the latest changes in the past month? I'd like to know if it's worth upgrading the lib or if we still have to use workaround via custom actions |
hasn't been addressed yet, sadly. @marcoroth do we have to untie #636 ? |
I need to double check, it might be related #636, but I think it's more related to an unhandled edge case with setting up the declarative reflex attributes. |
Is there some new version/release I could try this on? |
Looks like I can't reproduce this on rc2. But looking at your example you need to make sure to also include the - data-reflex="Example#masticate"
+ data-reflex="click->Example#masticate" So the following snippet: <div data-controller="example">
<a href="#" data-reflex="click->Example#masticate">Eat</a>
</div> will transform into this as expected (this is on <div data-controller="example">
<a href="#" data-reflex="click->Example#masticate" data-action="click->example#__perform">Eat</a>
</div> Also make sure that StimulusReflex was registered in the |
This should be resolved with the release of |
Bug Report
Describe the bug
Using the custom
data-controller
abovedata-reflex
is ignored and reflex is always executed with defaultstimulus-reflex
controller.This breaks behavior and callbacks described in https://docs.stimulusreflex.com/guide/lifecycle.html#callback-methods
It may be related to: #636
Discussed in Discord: https://discord.com/channels/629472241427415060/733725826411135107/1100724714760044606
To Reproduce
In the end the element has
<a href="#" data-reflex="Example#masticate" data-action="stimulus-reflex#__perform">Eat</a>
tag. Console log is not shownExpected behavior
Element should have
<a href="#" data-reflex="Example#masticate" data-action="example#__perform">Eat</a>
tagsScreenshots or reproduction
pre10 - where it worked
rc1 - where it's not working
Versions
The text was updated successfully, but these errors were encountered: