Closed eirvandelden closed 6 years ago
What I did:
text
data-target=jamming.solution
hidden
this.solutionTarget.value = 'foo'
What I expected:
foo
What I got:
text' input to have value
On 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
this.solutionTargets.forEach( (elem) => { elem.value = 'foo' } )
@skyksandr is correct (thanks!)
What I did:
text
input withdata-target=jamming.solution
hidden
input withdata-target=jamming.solution
this.solutionTarget.value = 'foo'
What I expected:
text
input to have valuefoo
hidden
input to have valuefoo
What I got:
text' input to have value
foo`hidden
input to have no valueOn StimulusJS 1.0.1 (and a Rails 5.1 app)