我在 React Material Component
中使用Textfiled
组件,html string
为help 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>)
这只是警告,但想知道如何处理和解决这个问题。