What I did:
text input with data-target=jamming.solutionhidden input with data-target=jamming.solutionthis.solutionTarget.value = 'foo'What I expected:
text input to have value foohidden input to have value fooWhat I got:
text' input to have valuefoo`hidden input to have no valueOn StimulusJS 1.0.1 (and a Rails 5.1 app)
I believe you have to use plural form this.solutionTargets and iterate over like:
this.solutionTargets.forEach( (elem) => { elem.value = 'foo' } )
@skyksandr is correct (thanks!)
Most helpful comment
I believe you have to use plural form
this.solutionTargetsand iterate over like: