@@ -76,8 +76,9 @@ class InputBase extends React.Component {
7676
7777 let inputGroupClassName ;
7878 switch ( this . props . bsSize ) {
79- case 'small' : inputGroupClassName = 'input-group-sm' ; break ;
80- case 'large' : inputGroupClassName = 'input-group-lg' ; break ;
79+ case 'small' : inputGroupClassName = 'input-group-sm' ; break ;
80+ case 'large' : inputGroupClassName = 'input-group-lg' ; break ;
81+ default :
8182 }
8283
8384 return addonBefore || addonAfter || buttonBefore || buttonAfter ? (
@@ -98,10 +99,10 @@ class InputBase extends React.Component {
9899 }
99100
100101 switch ( this . props . bsStyle ) {
101- case 'success' : return < Glyphicon formControlFeedback glyph = "ok" key = "icon" /> ;
102- case 'warning' : return < Glyphicon formControlFeedback glyph = "warning-sign" key = "icon" /> ;
103- case 'error' : return < Glyphicon formControlFeedback glyph = "remove" key = "icon" /> ;
104- default : return < span className = "form-control-feedback" key = "icon" /> ;
102+ case 'success' : return < Glyphicon formControlFeedback glyph = "ok" key = "icon" /> ;
103+ case 'warning' : return < Glyphicon formControlFeedback glyph = "warning-sign" key = "icon" /> ;
104+ case 'error' : return < Glyphicon formControlFeedback glyph = "remove" key = "icon" /> ;
105+ default : return < span className = "form-control-feedback" key = "icon" /> ;
105106 }
106107 } else {
107108 return null ;
@@ -157,24 +158,24 @@ class InputBase extends React.Component {
157158 }
158159
159160 switch ( this . props . type ) {
160- case 'select' :
161- return (
162- < select { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" >
163- { this . props . children }
164- </ select >
165- ) ;
166- case 'textarea' :
167- return < textarea { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" /> ;
168- case 'static' :
169- return (
170- < p { ...this . props } className = { classNames ( this . props . className , 'form-control-static' ) } ref = "input" key = "input" >
171- { this . props . value }
172- </ p >
173- ) ;
161+ case 'select' :
162+ return (
163+ < select { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" >
164+ { this . props . children }
165+ </ select >
166+ ) ;
167+ case 'textarea' :
168+ return < textarea { ...this . props } className = { classNames ( this . props . className , 'form-control' ) } ref = "input" key = "input" /> ;
169+ case 'static' :
170+ return (
171+ < p { ...this . props } className = { classNames ( this . props . className , 'form-control-static' ) } ref = "input" key = "input" >
172+ { this . props . value }
173+ </ p >
174+ ) ;
175+ default :
176+ const className = this . isCheckboxOrRadio ( ) || this . isFile ( ) ? '' : 'form-control' ;
177+ return < input { ...this . props } className = { classNames ( this . props . className , className ) } ref = "input" key = "input" /> ;
174178 }
175-
176- let className = this . isCheckboxOrRadio ( ) || this . isFile ( ) ? '' : 'form-control' ;
177- return < input { ...this . props } className = { classNames ( this . props . className , className ) } ref = "input" key = "input" /> ;
178179 }
179180
180181 renderFormGroup ( children ) {
0 commit comments