@@ -28,6 +28,7 @@ var Typeahead = React.createClass({
2828 allowCustomValues : React . PropTypes . number ,
2929 defaultValue : React . PropTypes . string ,
3030 placeholder : React . PropTypes . string ,
31+ textarea : React . PropTypes . bool ,
3132 inputProps : React . PropTypes . object ,
3233 onOptionSelected : React . PropTypes . func ,
3334 onChange : React . PropTypes . func ,
@@ -56,6 +57,7 @@ var Typeahead = React.createClass({
5657 allowCustomValues : 0 ,
5758 defaultValue : "" ,
5859 placeholder : "" ,
60+ textarea : false ,
5961 inputProps : { } ,
6062 onOptionSelected : function ( option ) { } ,
6163 onChange : function ( event ) { } ,
@@ -290,10 +292,12 @@ var Typeahead = React.createClass({
290292 classes [ this . props . className ] = ! ! this . props . className ;
291293 var classList = classNames ( classes ) ;
292294
295+ var InputElement = this . props . textarea ? 'textarea' : 'input' ;
296+
293297 return (
294298 < div className = { classList } >
295299 { this . _renderHiddenInput ( ) }
296- < input ref = "entry" type = "text"
300+ < InputElement ref = "entry" type = "text"
297301 { ...this . props . inputProps }
298302 placeholder = { this . props . placeholder }
299303 className = { inputClassList }
0 commit comments