mirror of
https://github.com/apache/superset.git
synced 2024-09-17 19:19:38 -04:00
[sql lab] fix numeric sort in data table (#3587)
Currently numerical values sort as alpha, this addresses the issue.
This commit is contained in:
parent
15ecdeb3ba
commit
645de384e3
@ -82,7 +82,7 @@ export default class FilterableTable extends PureComponent {
|
|||||||
const newRow = {};
|
const newRow = {};
|
||||||
for (const k in row) {
|
for (const k in row) {
|
||||||
const val = row[k];
|
const val = row[k];
|
||||||
if (typeof (val) === 'string') {
|
if (['string', 'number'].indexOf(typeof (val)) >= 0) {
|
||||||
newRow[k] = val;
|
newRow[k] = val;
|
||||||
} else {
|
} else {
|
||||||
newRow[k] = JSON.stringify(val);
|
newRow[k] = JSON.stringify(val);
|
||||||
@ -150,7 +150,6 @@ export default class FilterableTable extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const rowGetter = ({ index }) => this.getDatum(sortedAndFilteredList, index);
|
const rowGetter = ({ index }) => this.getDatum(sortedAndFilteredList, index);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{ height }}
|
style={{ height }}
|
||||||
|
Loading…
Reference in New Issue
Block a user