You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/10/04 17:17:04 UTC
[incubator-superset] branch master updated: [sql lab] fix numeric
sort in data table (#3587)
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 645de38 [sql lab] fix numeric sort in data table (#3587)
645de38 is described below
commit 645de384e324f76cc3bf5b3a35851f203bd3c76f
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Oct 4 10:17:01 2017 -0700
[sql lab] fix numeric sort in data table (#3587)
Currently numerical values sort as alpha, this addresses the issue.
---
.../assets/javascripts/components/FilterableTable/FilterableTable.jsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx b/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx
index f72014a..7874aab 100644
--- a/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx
+++ b/superset/assets/javascripts/components/FilterableTable/FilterableTable.jsx
@@ -82,7 +82,7 @@ export default class FilterableTable extends PureComponent {
const newRow = {};
for (const k in row) {
const val = row[k];
- if (typeof (val) === 'string') {
+ if (['string', 'number'].indexOf(typeof (val)) >= 0) {
newRow[k] = val;
} else {
newRow[k] = JSON.stringify(val);
@@ -150,7 +150,6 @@ export default class FilterableTable extends PureComponent {
}
const rowGetter = ({ index }) => this.getDatum(sortedAndFilteredList, index);
-
return (
<div
style={{ height }}
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].