From 4904ef1c98a9fb5abadc13864635c0d7b92a95fd Mon Sep 17 00:00:00 2001 From: lyndsiWilliams Date: Wed, 1 Dec 2021 18:35:50 -0600 Subject: [PATCH] Add equality check back to sort function --- .../src/components/FilterableTable/FilterableTable.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx index f73287515c8c4..eea9901301792 100644 --- a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx +++ b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx @@ -332,6 +332,11 @@ export default class FilterableTable extends PureComponent< const aValue = this.parseFloatingNums(a[sortBy]); const bValue = this.parseFloatingNums(b[sortBy]); + // equal items sort equally + if (aValue === bValue) { + return 0; + } + // nulls sort after anything else if (aValue === null) { return 1;