From commits-return-1956-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Tue Dec 18 02:04:00 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9B5C9180652 for ; Tue, 18 Dec 2018 02:03:59 +0100 (CET) Received: (qmail 92653 invoked by uid 500); 18 Dec 2018 01:03:58 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 92644 invoked by uid 99); 18 Dec 2018 01:03:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2018 01:03:58 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 10F4685286; Tue, 18 Dec 2018 01:03:58 +0000 (UTC) Date: Tue, 18 Dec 2018 01:03:57 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Fix string value displaying NaN (#6534) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <154509503772.1713.11697712919805922992@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9ec3e18ecb6c183237d859919af4daea7893b897 X-Git-Newrev: 95cdda4482c76b9bb6578fbe8862c8b0b1421787 X-Git-Rev: 95cdda4482c76b9bb6578fbe8862c8b0b1421787 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new 95cdda4 Fix string value displaying NaN (#6534) 95cdda4 is described below commit 95cdda4482c76b9bb6578fbe8862c8b0b1421787 Author: Mars AuthorDate: Tue Dec 18 09:03:51 2018 +0800 Fix string value displaying NaN (#6534) --- superset/assets/src/visualizations/Table/Table.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/superset/assets/src/visualizations/Table/Table.js b/superset/assets/src/visualizations/Table/Table.js index 23cdc07..e8742af 100644 --- a/superset/assets/src/visualizations/Table/Table.js +++ b/superset/assets/src/visualizations/Table/Table.js @@ -174,7 +174,15 @@ function TableVis(element, props) { return null; }) .classed('text-right', d => d.isMetric) - .attr('title', d => (!Number.isNaN(d.val) ? formatValue(d.val) : null)) + .attr('title', (d) => { + if (typeof d.val === 'string') { + return d.val; + } + if (!Number.isNaN(d.val)) { + return formatValue(d.val); + } + return null; + }) .attr('data-sort', d => (d.isMetric) ? d.val : null) // Check if the dashboard currently has a filter for each row .classed('filtered', d =>