From c5be6188cdded1f9d6c30be37b483a841c87377a Mon Sep 17 00:00:00 2001 From: David Cumps Date: Sat, 29 Aug 2015 03:38:30 +0200 Subject: [PATCH] Provide isScrollbarVisible for table --- src/table/table.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/table/table.jsx b/src/table/table.jsx index 5e2d00af9bffc1..bfb64293a8b085 100644 --- a/src/table/table.jsx +++ b/src/table/table.jsx @@ -136,8 +136,8 @@ let Table = React.createClass({ return (
{headerTable} -
- +
+
{inlineHeader} {inlineFooter} {tBody} @@ -148,6 +148,13 @@ let Table = React.createClass({ ); }, + isScrollbarVisible() { + const tableDivHeight = React.findDOMNode(this.refs.tableDiv).clientHeight; + const tableBodyHeight = React.findDOMNode(this.refs.tableBody).clientHeight; + + return tableBodyHeight > tableDivHeight; + }, + _createTableHeader(base) { return React.cloneElement( base,