material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

feature request: text-field support autoFocus

Open ericfong opened this issue 11 years ago • 5 comments

Shall we make text-field support autoFocus?

Thx

ericfong avatar Jul 14 '15 05:07 ericfong

@ericfong Can you explain a little more about what you mean by autoFocus?

hai-cea avatar Jul 14 '15 13:07 hai-cea

We want to have:

<TextField autoFocus={true} />

which can set the internal attribute http://www.w3schools.com/tags/att_input_autofocus.asp

According to https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes autoFocus is supported

ericfong avatar Jul 14 '15 14:07 ericfong

@ericfong I believe that this is currently supported since we're passing props down to the underlying input element. https://github.com/callemall/material-ui/blob/master/src/text-field.jsx#L283

Have you tried setting this?

hai-cea avatar Jul 14 '15 14:07 hai-cea

My bad,

I used

<TextField >
    <input authFocus={true} />
</TextField>

And the text field don't know the inner input actually focused.

When I use

<TextField authFocus={true} >
</TextField>

which is ok.

ericfong avatar Jul 16 '15 10:07 ericfong

is there any feature to spport RTL text(for arebic languages) in textfield .or we have any npm pakage to support this feature in react .

satishsathya11 avatar Feb 12 '17 13:02 satishsathya11