diff options
-rw-r--r-- | README.md | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -7,11 +7,11 @@ A light replacement for built-in textarea component which automaticaly adjusts i This module is based on the very popular autosize script written by Jack Moore. Check its website [here](http://www.jacklmoore.com/autosize/) for more documentation. ``` -var Textarea = require('react-autosize-textarea'); +var TextareaAutosize = require('react-autosize-textarea'); React.renderComponent( <div> - <Textarea></Textarea> + <TextareaAutosize {...textareaProps} onResize={() => {}} /> </div>, document.body); ``` @@ -21,6 +21,14 @@ React.renderComponent( npm install --save react-autosize-textarea ``` +###API +You can pass any props you're allowed to use with default React textarea (valueLink too). + +You can also pass the callback **onResize** which will be triggered at any resize: +``` +onResize: React.PropTypes.func +``` + ###Browser Compatibility | Chrome | Firefox | IE | Safari | Android | | ------------- | ------------- | ----- | ------ | ------- | |