Closed jrmgx closed 4 months ago
https://jsfiddle.net/ildarkayumov/02u9xjed/ I tried to create an example based on your code and it worked well
can you try it by yourself and provide non-working example please?
Thank you for your time, it is exactly the case I was describing in my issue, but as you said it work well in your reproducer.
So I'm a bit confuse. It is probably on my side, there is no other explanation.
This is the actual code in context if you want to take a quick look. Note: I'm not asking anything here, but it may talk to you, if you don't have time, no worries!
Action call: https://github.com/jrmgx/trailOdysseyOpen/blob/bd4c88826aa147221dfba22bff0f22aa74a3dcc1/templates/geo/elements_frame.html.twig#L44 Plan controller: https://github.com/jrmgx/trailOdysseyOpen/blob/bd4c88826aa147221dfba22bff0f22aa74a3dcc1/assets/controllers/plan_controller.js#L66 Sidebar controller: https://github.com/jrmgx/trailOdysseyOpen/blob/bd4c88826aa147221dfba22bff0f22aa74a3dcc1/assets/controllers/sidebar_controller.js#L67
If nothing seems obvious to you, let's close that issue as it certainly a bug inside my own code.
Sorry for the wasted energy, have a good day.
@jrmgx I see that you pass all params to all actions
data-plan-tab-param="interests"
data-plan-scroll-param="true"
data-sidebar-tab-param="interests"
data-sidebar-scroll-param="true"
what would happen if you pass only needed params like this ?
data-plan-tab-param="interests"
data-sidebar-scroll-param="true"
I tried to create a new example https://jsfiddle.net/ildarkayumov/28qnyL1u/ and it works well for me too
Putting all parameters to all actions is my way of mitigating the issue, that's why. But let's close it for now, there is something wrong on my side for sure. Thank you for your time, if I ever find out, I'll put a message here.
Have a good day
On a link I have two actions from two different controllers chained like this:
I have also added associated params for each action like that:
When I click on this link, I have both actions called, but in each one I receive the
plan-tab
param.I expected to receive the
plan-tab
param in theplan
action and thesidebar-scroll
param in thesidebar
action.Note: if I reverse the order of the actions, putting first
plan#actionTwo
then I receive thesidebar-scroll
param in both instead of theplan-tab
one.Stimulus 3.2.2