@@ -47170,11 +47170,13 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4717047170 }
4717147171 },
4717247172 getTableHeight: function getTableHeight() {
47173- var height = _this.props.height ;
47173+ var maxHeight = _this.props.maxHeight ;
4717447174
47175+ var tableTopBorder = _this.tableWrapper.style['border-top-width'] || window.getComputedStyle(_this.tableWrapper, null)['border-top-width'];
47176+ var tableBottomBorder = _this.tableWrapper.style['border-bottom-width'] || window.getComputedStyle(_this.tableWrapper, null)['border-bottom-width'];
4717547177 var headerHeight = _this.title ? _this.title.getBoundingClientRect().height : 0;
4717647178 var footerHeight = _this.foot ? _this.foot.getBoundingClientRect().height : 0;
47177- var tableHeight = height - headerHeight - footerHeight;
47179+ var tableHeight = maxHeight - headerHeight - footerHeight - parseInt(tableTopBorder, 10) - parseInt(tableBottomBorder, 10) ;
4717847180 _this.setState({ tableHeight: tableHeight });
4717947181 }
4718047182 }, _temp), _possibleConstructorReturn(_this, _ret);
@@ -47198,7 +47200,7 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4719847200 }, {
4719947201 key: 'componentDidUpdate',
4720047202 value: function componentDidUpdate(prevProps, prevState) {
47201- if (prevProps.data !== this.props.data || prevProps.height !== this.props.height ) {
47203+ if (prevProps.data !== this.props.data || prevProps.maxHeight !== this.props.maxHeight ) {
4720247204 var getTableHeight = this.actions.getTableHeight;
4720347205
4720447206 getTableHeight();
@@ -47252,7 +47254,7 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4725247254
4725347255 return _react2.default.createElement(_TableTemplate2.default, _extends({}, this.props, {
4725447256 currentHoverKey: currentHoverKey,
47255- height : tableHeight,
47257+ maxHeight : tableHeight,
4725647258 onMouseOver: detectScrollTarget,
4725747259 onRowHover: handleRowHover,
4725847260 onTouchStart: detectScrollTarget,
@@ -47282,7 +47284,7 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4728247284 columns: fixedColumns,
4728347285 currentHoverKey: currentHoverKey,
4728447286 className: _index2.default.tableFixedLeftContainer,
47285- height : tableHeight,
47287+ maxHeight : tableHeight,
4728647288 isFixed: true,
4728747289 onMouseOver: detectScrollTarget,
4728847290 onRowHover: handleRowHover,
@@ -47392,10 +47394,10 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4739247394 expandedRowKeys: _propTypes2.default.array,
4739347395 expandedRowRender: _propTypes2.default.func,
4739447396 footer: _propTypes2.default.func,
47395- height: _propTypes2.default.number,
4739647397 hoverable: _propTypes2.default.bool,
4739747398 loading: _propTypes2.default.bool,
4739847399 loaderRender: _propTypes2.default.func,
47400+ maxHeight: _propTypes2.default.number,
4739947401 onRowClick: _propTypes2.default.func,
4740047402 showHeader: _propTypes2.default.bool,
4740147403 sortable: _propTypes2.default.bool,
@@ -47408,6 +47410,7 @@ var Table = (_temp2 = _class = function (_PureComponent) {
4740847410 bordered: true,
4740947411 hoverable: true,
4741047412 loading: false,
47413+ maxHeight: 0,
4741147414 sortable: false,
4741247415 useFixedHeader: false
4741347416}, _temp2);
@@ -48232,11 +48235,11 @@ var TableTemplate = (_temp2 = _class = function (_PureComponent) {
4823248235 };
4823348236 },
4823448237 getTableHeight: function getTableHeight() {
48235- var height = _this.props.height ;
48238+ var maxHeight = _this.props.maxHeight ;
4823648239
4823748240 var headerHeight = _this.tableHeader ? _this.tableHeader.header.getBoundingClientRect().height : 0;
48238- var tableHeight = height ;
48239- var bodyHeight = height ? height - headerHeight : 0;
48241+ var tableHeight = maxHeight ;
48242+ var bodyHeight = maxHeight ? maxHeight - headerHeight : 0;
4824048243 _this.setState({
4824148244 tableHeight: tableHeight,
4824248245 bodyHeight: bodyHeight
@@ -48376,7 +48379,7 @@ var TableTemplate = (_temp2 = _class = function (_PureComponent) {
4837648379 }, {
4837748380 key: 'componentDidUpdate',
4837848381 value: function componentDidUpdate(prevProps, prevState) {
48379- if (prevProps.data !== this.props.data || prevProps.height !== this.props.height ) {
48382+ if (prevProps.data !== this.props.data || prevProps.maxHeight !== this.props.maxHeight ) {
4838048383 var getTableHeight = this.actions.getTableHeight;
4838148384
4838248385 getTableHeight();
@@ -48442,10 +48445,11 @@ var TableTemplate = (_temp2 = _class = function (_PureComponent) {
4844248445 var tableHeight = this.state.tableHeight;
4844348446
4844448447 var customStyles = {
48445- height: 'none'
48448+ minHeight: '0%',
48449+ maxHeight: 'none'
4844648450 };
4844748451 if (tableHeight) {
48448- customStyles.height = tableHeight + 'px';
48452+ customStyles.maxHeight = tableHeight + 'px';
4844948453 }
4845048454
4845148455 return _react2.default.createElement(
@@ -48454,7 +48458,7 @@ var TableTemplate = (_temp2 = _class = function (_PureComponent) {
4845448458 ref: function ref(node) {
4845548459 _this4.table = node;
4845648460 },
48457- style: { height: customStyles.height } ,
48461+ style: customStyles,
4845848462 className: (0, _classnames2.default)(className, _index2.default.table)
4845948463 },
4846048464 showHeader && this.renderHeader(),
@@ -48472,10 +48476,10 @@ var TableTemplate = (_temp2 = _class = function (_PureComponent) {
4847248476 data: _propTypes2.default.array,
4847348477 emptyText: _propTypes2.default.func,
4847448478 footer: _propTypes2.default.func,
48475- height: _propTypes2.default.number,
4847648479 hoverable: _propTypes2.default.bool,
4847748480 isFixed: _propTypes2.default.bool,
4847848481 loading: _propTypes2.default.bool,
48482+ maxHeight: _propTypes2.default.number,
4847948483 onMouseOver: _propTypes2.default.func,
4848048484 onTouchStart: _propTypes2.default.func,
4848148485 onScroll: _propTypes2.default.func,
@@ -49099,7 +49103,7 @@ var _default = function (_Component) {
4909949103 hoverable: true,
4910049104 sortable: true,
4910149105 showHeader: false,
49102- height : 180,
49106+ maxHeight : 180,
4910349107 rowKey: function rowKey(record) {
4910449108 return record.id;
4910549109 },
@@ -49245,7 +49249,7 @@ var _default = function (_Component) {
4924549249 _react2.default.createElement(_src2.default, {
4924649250 hoverable: true,
4924749251 averageColumnsWidth: false,
49248- height : 180,
49252+ maxHeight : 180,
4924949253 rowKey: 'id',
4925049254 columns: columns,
4925149255 data: data,
@@ -49354,7 +49358,7 @@ var _default = function (_Component) {
4935449358 _react2.default.createElement(_src2.default, {
4935549359 averageColumnsWidth: true,
4935649360 hoverable: true,
49357- height : 180,
49361+ maxHeight : 180,
4935849362 useFixedHeader: true,
4935949363 rowKey: function rowKey(record) {
4936049364 return record.id;
@@ -49366,7 +49370,7 @@ var _default = function (_Component) {
4936649370 _react2.default.createElement(_src2.default, {
4936749371 averageColumnsWidth: false,
4936849372 hoverable: true,
49369- height : 180,
49373+ maxHeight : 180,
4937049374 useFixedHeader: true,
4937149375 rowKey: function rowKey(record) {
4937249376 return record.id;
@@ -49386,7 +49390,7 @@ var _default = function (_Component) {
4938649390 _react2.default.createElement(_src2.default, {
4938749391 averageColumnsWidth: false,
4938849392 hoverable: false,
49389- height : 180,
49393+ maxHeight : 180,
4939049394 useFixedHeader: true,
4939149395 rowKey: 'id',
4939249396 columns: this.columns3,
@@ -49515,7 +49519,7 @@ var _default = function (_Component) {
4951549519 },
4951649520 columns: columns,
4951749521 data: data,
49518- height : 180,
49522+ maxHeight : 180,
4951949523 title: function title() {
4952049524 return _react2.default.createElement(
4952149525 'div',
@@ -49558,7 +49562,7 @@ var _default = function (_Component) {
4955849562 },
4955949563 columns: columns,
4956049564 data: data,
49561- height: 200 ,
49565+ maxHeight: 300 ,
4956249566 useFixedHeader: true,
4956349567 title: function title() {
4956449568 return _react2.default.createElement(
@@ -50018,4 +50022,4 @@ exports.default = _default;
5001850022/***/ })
5001950023
5002050024/******/ });
50021- //# sourceMappingURL=bundle.js.map?4603659f7847bf5061de
50025+ //# sourceMappingURL=bundle.js.map?7db55b11fec6d69261ba
0 commit comments