mirror of
https://github.com/apache/superset.git
synced 2026-05-11 19:05:24 +00:00
fix: issue with sorting by multiple columns in a table (#19920)
Recent commit to sort alphanumeric columns via case insensitive
comparison broke the multi-column sort option. React-table only sorts
by the second (or third...) column if the first column matches.
Since the alphanumeric sort only returned -1 or 1, it never would move
to the subsequent columns when the earlier column values matched.
(cherry picked from commit a45d011e74)
This commit is contained in:
committed by
Michael S. Molina
parent
23061d6822
commit
bcc23bbacd
@@ -33,5 +33,5 @@ export const sortAlphanumericCaseInsensitive = <D extends {}>(
|
||||
if (!valueB || typeof valueB !== 'string') {
|
||||
return 1;
|
||||
}
|
||||
return valueA.localeCompare(valueB) > 0 ? 1 : -1;
|
||||
return valueA.localeCompare(valueB);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user