Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 712a6b0

Browse files
committed
right sorting order
1 parent e666eb2 commit 712a6b0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Resources/assets/js/adapter/fancytree.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ export class FancytreeAdapter {
230230

231231
if (this.sortableBy) {
232232
fancytreeOptions.sortChildren = (a, b) => {
233-
var current = a[this.sortableBy];
234-
var next = b[this.sortableBy];
233+
var current = a.data[this.sortableBy];
234+
var next = b.data[this.sortableBy];
235235
if (current == next) {
236236
return 0;
237237
} else if (current < next) {
238-
return 1;
239-
} else {
240238
return -1;
239+
} else {
240+
return 1;
241241
}
242242
};
243243
}

0 commit comments

Comments
 (0)