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.
2 parents 654fcfc + 9c7ea4f commit f75681eCopy full SHA for f75681e
projects/ng-sortgrid/src/lib/sort/reflection/ngsg-reflect.service.ts
@@ -15,7 +15,9 @@ export class NgsgReflectService {
15
const selectedElements = this.ngsgStore.getSelectedItems(key);
16
const selectedElementIndices = this.getSelectedElementsIndices(selectedElements);
17
const selectedItems = this.getSelectedItems(items, selectedElementIndices);
18
- const sortedIndices = selectedElementIndices.sort();
+ const sortedIndices = selectedElementIndices.sort(function(a,b) {
19
+ return a - b;
20
+ });
21
const dropIndex = this.findDropIndex(selectedElements, element);
22
23
while (sortedIndices.length > 0) {
0 commit comments