evblurbs / react-native-md-textinput

React Native TextInput styled with Material Design.
322 stars 122 forks source link

[Feature] Set the input field content on render #22

Closed aviadhahami closed 8 years ago

aviadhahami commented 8 years ago

Hi, I would like to suggest a feature. This will expose a prop initialContent = "myString" which will yield the component with the text already inserted (some like binding an input field to scope variable in angular)

aviadhahami commented 8 years ago

Ok, as I suspected this prop exists in TextField.js#L13 yet not exposed in the official docs. Any particular reason for there?

antoinerousseau commented 8 years ago

the value props is standard in React

http://facebook.github.io/react-native/releases/0.32/docs/textinput.html#value

aviadhahami commented 8 years ago

@antoinerousseau yes, but this is a higher-order component thus it is not obvious

antoinerousseau commented 8 years ago

ok you can close this issue then ;)

evblurbs commented 8 years ago

I'm the docs I mention all props are passed to the TextField component, and link to the TextField props documentation. I have an example of using the TextField props to display a numeric keyboard. Maybe adding an example with the value prop will help? I'm not going to document all the TextField props though.

aviadhahami commented 8 years ago

@evblurbs yes, I think this can help as this is a common usecase @antoinerousseau but ummm but ummm