From 6b284c43e20fd768868a5c1a0e0070857107911e Mon Sep 17 00:00:00 2001
From: Tom Robinson <tlrobinson@gmail.com>
Date: Sun, 5 Jul 2015 19:45:28 -0700
Subject: [PATCH] Fix data table column sizing issue

---
 .../app/query_builder/visualization_table.react.js          | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/resources/frontend_client/app/query_builder/visualization_table.react.js b/resources/frontend_client/app/query_builder/visualization_table.react.js
index 0b056460f1d..f8ee552466c 100644
--- a/resources/frontend_client/app/query_builder/visualization_table.react.js
+++ b/resources/frontend_client/app/query_builder/visualization_table.react.js
@@ -80,11 +80,13 @@ export default React.createClass({
     calculateSizing: function(prevState) {
         var element = this.getDOMNode(); //React.findDOMNode(this);
 
-        // account for padding above our parent
+        // account for padding of our parent
         var style = window.getComputedStyle(element.parentElement, null);
         var paddingTop = Math.ceil(parseFloat(style.getPropertyValue("padding-top")));
+        var paddingLeft = Math.ceil(parseFloat(style.getPropertyValue("padding-left")));
+        var paddingRight = Math.ceil(parseFloat(style.getPropertyValue("padding-right")));
 
-        var width = element.parentElement.offsetWidth;
+        var width = element.parentElement.offsetWidth - paddingLeft - paddingRight;
         var height = element.parentElement.offsetHeight - paddingTop;
 
         if (width !== prevState.width || height !== prevState.height) {
-- 
GitLab