用html字符串反应MDC Web Textfiled的帮助文本

时间:2018-03-13 13:33:56

标签: html reactjs material-design materialize material-ui

我在 React Material Component 中使用Textfiled组件,html stringhelp text,在浏览器控制台中关注warning

Warning: Failed prop type: Invalid prop `helptext` of type `object` supplied to `t`, expected `string`.
    in t (created by DetailsForm)
    in DetailsForm (created by Unknown)
    in div (created by Unknown)
    in form (created by Unknown)
    in dialog (created by Unknown)
    in Unknown

这就是我使用Textfiled组件的方式:

    <Textfield
       name="bill"
       floatingLabel="Total bill"
       disabled={this.state.isDisabled}
       helptext={helpTextBill}
       helptextPersistent
       value={this.state.bill}
    />

helpTextBill的值为:

helpTextBill = (<span>For details visit <a href="/url-path/"> here </a></span>) 

这只是警告,但想知道如何处理和解决这个问题。

0 个答案:

没有答案