From 0629f23414acaa17784fbc6815cf9425265012a1 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Mon, 27 Feb 2017 14:24:54 +0800 Subject: [PATCH] Set maxHeight to inner body Fix https://github.com/ant-design/ant-design/issues/4893 --- src/Table.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Table.jsx b/src/Table.jsx index a27413164..6cf3cdc9e 100644 --- a/src/Table.jsx +++ b/src/Table.jsx @@ -428,11 +428,13 @@ export default class Table extends React.Component { bodyStyle.overflowX = bodyStyle.overflowX || 'auto'; } + const innerBodyStyle = {}; if (scroll.y) { // maxHeight will make fixed-Table scrolling not working // so we only set maxHeight to body-Table here if (fixed) { - bodyStyle.height = bodyStyle.height || scroll.y; + innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; + innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll'; } else { bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; } @@ -520,6 +522,7 @@ export default class Table extends React.Component { >