File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -880,7 +880,8 @@ class BootstrapTable extends Component {
880
880
}
881
881
882
882
_adjustHeight = ( ) => {
883
- if ( this . props . height . indexOf ( '%' ) === - 1 ) {
883
+ if ( ( typeof this . props . height === 'number' && ! isNaN ( this . props . height ) ) ||
884
+ this . props . height . indexOf ( '%' ) === - 1 ) {
884
885
this . refs . body . refs . container . style . height =
885
886
parseFloat ( this . props . height , 10 ) - this . refs . header . refs . container . offsetHeight + 'px' ;
886
887
}
@@ -912,8 +913,8 @@ class BootstrapTable extends Component {
912
913
913
914
BootstrapTable . propTypes = {
914
915
keyField : PropTypes . string ,
915
- height : PropTypes . string ,
916
- maxHeight : PropTypes . string ,
916
+ height : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
917
+ maxHeight : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] ) ,
917
918
data : PropTypes . oneOfType ( [ PropTypes . array , PropTypes . object ] ) ,
918
919
remote : PropTypes . bool , // remote data, default is false
919
920
striped : PropTypes . bool ,
You can’t perform that action at this time.
0 commit comments