We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d07913 commit 2ae2bd4Copy full SHA for 2ae2bd4
src/lib/table/table-data-source.ts
@@ -124,9 +124,9 @@ export class MatTableDataSource<T> implements DataSource<T> {
124
let comparatorResult = 0;
125
if (valueA && valueB) {
126
// Check if one value is greater than the other; if equal, comparatorResult should remain 0.
127
- if (valueA < valueB) {
128
- comparatorResult = -1;
129
- } else if (valueB < valueA) {
+ if (valueA > valueB) {
+ comparatorResult = 1;
+ } else if (valueA < valueB) {
130
comparatorResult = 1;
131
}
132
} else if (valueA) {
0 commit comments