You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/11/29 15:58:02 UTC

[GitHub] [superset] AAfghahi commented on a change in pull request #17573: fix(sqllab): Floating numbers not sorting correctly in result column

AAfghahi commented on a change in pull request #17573:
URL: https://github.com/apache/superset/pull/17573#discussion_r758501567



##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -325,6 +325,11 @@ export default class FilterableTable extends PureComponent<
     return (a: Datum, b: Datum) => {
       const aValue = a[sortBy];
       const bValue = b[sortBy];
+
+      // Parse any floating numbers so they'll sort correctly
+      const parseFloatingNums = (value: any) =>
+        value.isNan ? value : parseFloat(value);

Review comment:
       that's cool, didn't know that isNan was a function!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org