Hello,
We have some complex partials reused between different controllers and we end up with markup like this:
<div
...
data-foo-my-target='input'
data-bar-my-target='input'
>
The thing is when we render the partial containing this we will only ever have one of these controllers. So another partial containing FooController will render this once and yet another partial containing BarController will render this elsewhere.
This leads to The Stimulus target '${targetName}' is not inside the Stimulus controller '${controllerId}' I wonder if there's a way to handle this? Or is there an idiomatic Stimulus way of not doing what we're doing? As far as I understand the above is valid in Stimulus world, but I may be wrong.
Hello,
We have some complex partials reused between different controllers and we end up with markup like this:
The thing is when we render the partial containing this we will only ever have one of these controllers. So another partial containing
FooControllerwill render this once and yet another partial containingBarControllerwill render this elsewhere.This leads to
The Stimulus target '${targetName}' is not inside the Stimulus controller '${controllerId}'I wonder if there's a way to handle this? Or is there an idiomatic Stimulus way of not doing what we're doing? As far as I understand the above is valid in Stimulus world, but I may be wrong.