File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ this.refs.input.clear();
276276| inputRef | none | function | input or textarea ref |
277277| maxlength | none | int | input or textarea maxlength |
278278| onMaxLengthExceed | none | function | called when max length exceed |
279+ | autofocus | false | bool | input autofocus |
279280
280281
281282## Button Component
Original file line number Diff line number Diff line change 11{
22 "name" : " react-chat-elements" ,
3- "version" : " 10.0.3 " ,
3+ "version" : " 10.0.4 " ,
44 "description" : " Reactjs chat components" ,
55 "author" : " Avare Kodcu <abdurrahmaneker58@gmail.com>" ,
66 "main" : " dist/main.js" ,
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ export class Input extends Component {
4646 this . onChange ( event ) ;
4747 }
4848
49+ componentDidMount ( ) {
50+ if ( this . props . autofocus === true )
51+ this . input . focus ( ) ;
52+ }
53+
4954 render ( ) {
5055 return (
5156 < div className = { classNames ( 'rce-container-input' , this . props . className ) } >
@@ -131,6 +136,7 @@ Input.defaultProps = {
131136 inputRef : null ,
132137 maxlength : null ,
133138 onMaxLengthExceed : null ,
139+ autofocus : false ,
134140} ;
135141
136142export default Input ;
You can’t perform that action at this time.
0 commit comments