reactjs.net - combine value from array with input element to create a reactjs -


i have use case need replace '_____' input tags. using reactjs.net. thought below, error.

the output is:

error: uncaught typeerror: cannot read property 'getdomnode' of undefined , uncaught error: minified exception occurred; use non-minified dev environment full error message , additional helpful warnings.

handleentry:function(){    var x = this.refs.value1.getdomnode().value;    console.log(x); }, render: function () {    var displayname = "abcd_____ efg _____ ijkl";    var splitthestring = displayname.split('_____');    var numofdashes = (displayname.match(/_____/g) || []).length;    if (numofdashes === 2) {     return <div>{splitthestring[0]} <input ref="value1" type="text" onblur={this.handleentry}/> {splitthestring[1]} <input ref="value2" type="text" onblur={this.handleentry}/> {splitthestring[2]}</div>;     } else {         return <div>{splitthestring[0]} <input ref="value1" type="text" onblur={this.handleentry}/></div>;     } } 


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -