mattiamanzati / typings-material-ui

Typings from callemall/material-ui project as NPM Module
MIT License
3 stars 2 forks source link

(Undocumented) property "autoFocus" is missing on TextField #23

Open neopostmodern opened 7 years ago

neopostmodern commented 7 years ago

TypeScript Version: 2.0.2

Typings Version: master

Issue: This property is pretty obscure, the best reference I've seen so far was at StackOverflow. It's not present in the docs, not even in the examples. Still works fine.

Code:

<TextField hintText="Search for something"
           autoFocus
           onKeyDown={this.handleKeyDownSearch.bind(this)} />

Possible fix:


export interface TextFieldProps extends TextFieldCommonProps {
  // [...]
  autoFocus?: boolean;
}
mattiamanzati commented 7 years ago

Uhm, autoFocus is actually a DOM attribute for the TextField only input, I see that's a PR in material-ui to also add it to selects, etc... I'll check out that!