Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextField] allow use react element in TextField hintText #1202

Closed
ericfong opened this issue Jul 18, 2015 · 3 comments
Closed

[TextField] allow use react element in TextField hintText #1202

ericfong opened this issue Jul 18, 2015 · 3 comments
Labels
component: text field This is the name of the generic UI component, not the React module!

Comments

@ericfong
Copy link

We would like to use

 <TextField
 hintText={<span><i className="material-icons">search</i>Search...</span>}
 type="search" />

to put a material-icon into the hintText

I found that is working now. But with warning

Warning: Failed propType: Invalid prop `hintText` of type `object` supplied to `TextField`, expected `string`. Check the render method of `SearchBox`.

Please allow pass in react element. Thx

@MinThaMie
Copy link

+1 Happy that it works, but would like it without warning!

@hai-cea hai-cea changed the title feature request: allow use react element in TextField hintText [TextField] feature request: allow use react element in TextField hintText Jul 31, 2015
@hai-cea hai-cea changed the title [TextField] feature request: allow use react element in TextField hintText [TextField] allow use react element in TextField hintText Jul 31, 2015
rrpff added a commit to rrpff/material-ui that referenced this issue Aug 15, 2015
It allows the hintText proptype to be either a string or an element.

Enhancement requested by mui#1202
@hai-cea
Copy link
Member

hai-cea commented Aug 17, 2015

Fixed with #1424

@hai-cea hai-cea closed this as completed Aug 17, 2015
rrpff added a commit to rrpff/material-ui that referenced this issue Aug 17, 2015
It allows the hintText proptype to be either a string or an element.

Enhancement requested by mui#1202
@MinThaMie
Copy link

What way should it be implemented? Cause if I do it as in the example the warning stays and if I do it without the brackets it gives an compiler error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

5 participants