From 1fee4f195201d536506535937c32b4afe56d94ba Mon Sep 17 00:00:00 2001
From: Tom Robinson <tlrobinson@gmail.com>
Date: Wed, 10 May 2017 13:47:14 -0700
Subject: [PATCH] Use formatValue directly instead of <Value> for slightly
 improved scroll performance

---
 .../components/TableInteractive.jsx             | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/frontend/src/metabase/visualizations/components/TableInteractive.jsx b/frontend/src/metabase/visualizations/components/TableInteractive.jsx
index 3723a5cfe5d..6673456bda4 100644
--- a/frontend/src/metabase/visualizations/components/TableInteractive.jsx
+++ b/frontend/src/metabase/visualizations/components/TableInteractive.jsx
@@ -8,9 +8,7 @@ import "./TableInteractive.css";
 
 import Icon from "metabase/components/Icon.jsx";
 
-import Value from "metabase/components/Value.jsx";
-
-import { capitalize } from "metabase/lib/formatting";
+import { formatValue, capitalize } from "metabase/lib/formatting";
 import { getFriendlyName } from "metabase/visualizations/lib/utils";
 import { getTableCellClickedObject, isColumnRightAligned } from "metabase/visualizations/lib/table";
 
@@ -236,13 +234,12 @@ export default class TableInteractive extends Component<*, Props, State> {
                 })}
             >
                 <div className="cellData">
-                    <Value
-                        className="link"
-                        type="cell"
-                        value={value}
-                        column={column}
-                        onResize={this.onCellResize.bind(this, columnIndex)}
-                    />
+                    {/* using formatValue instead of <Value> here for performance. The later wraps in an extra <span> */}
+                    {formatValue(value, {
+                        column: column,
+                        type: "cell",
+                        jsx: true
+                    })}
                 </div>
             </div>
         );
-- 
GitLab