输入不显示值

时间:2017-01-28 08:48:05

标签: javascript html reactjs

我有这段代码:

<input type="text" id="secound-kreab" placeholder="Twitter name" name="WebsitesAndSocial[]" value="europarl.com">

呈现方:

{this.state.Contact.WebsitesAndSocial.map((WebSocial, Index) => {
            return (
              <div className="row">
                <div className="col s12 m4 l4">
                  <label htmlFor=""><i className="material-icons">language</i> Websites & Other Links: </label>
                  <input id="secound-kreab" type="text" placeholder="Twitter name" name="WebsitesAndSocial[]" defaultValue={WebSocial} />
                </div>
                {Index == 0 ?
                <div id="add-web" className="add-web btn-floating kreab-color" onClick={this.addWeb} >
                  <i className="material-icons">add</i>
                </div>
                : null}
              </div>
            )
          })}

但浏览器显示的不是&#34;值&#34;标签的支柱。

dosnt render the value prop

0 个答案:

没有答案