File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -914,10 +914,19 @@ class BootstrapTable extends Component {
914
914
}
915
915
916
916
_adjustHeight = ( ) => {
917
- if ( ( typeof this . props . height === 'number' && ! isNaN ( this . props . height ) ) ||
918
- this . props . height . indexOf ( '%' ) === - 1 ) {
917
+ const { height } = this . props ;
918
+ let { maxHeight } = this . props ;
919
+ if ( ( typeof height === 'number' && ! isNaN ( height ) ) || height . indexOf ( '%' ) === - 1 ) {
919
920
this . refs . body . refs . container . style . height =
920
- parseFloat ( this . props . height , 10 ) - this . refs . header . refs . container . offsetHeight + 'px' ;
921
+ parseFloat ( height , 10 ) - this . refs . header . refs . container . offsetHeight + 'px' ;
922
+ }
923
+ if ( maxHeight ) {
924
+ maxHeight = typeof maxHeight === 'number' ?
925
+ maxHeight :
926
+ parseInt ( maxHeight . replace ( 'px' , '' ) , 10 ) ;
927
+
928
+ this . refs . body . refs . container . style . maxHeight =
929
+ maxHeight - this . refs . header . refs . container . offsetHeight + 'px' ;
921
930
}
922
931
}
923
932
You can’t perform that action at this time.
0 commit comments