Add support for CdkDragDrop in add-edit.component.js (#35)
This commit is contained in:
parent
a884f77938
commit
19516c20ff
|
@ -12,6 +12,15 @@
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@angular/cdk": {
|
||||||
|
"version": "7.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.2.1.tgz",
|
||||||
|
"integrity": "sha512-oU1Pjq3JkDtkXquLxWK84A2jOCeYRf352dVGbQCxWoSOQ5KBtMAd42huGidPiOSHN6/f7xZwL3n4fq3fVIut8A==",
|
||||||
|
"requires": {
|
||||||
|
"parse5": "^5.0.0",
|
||||||
|
"tslib": "^1.7.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@angular/common": {
|
"@angular/common": {
|
||||||
"version": "7.2.1",
|
"version": "7.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.1.tgz",
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "7.2.1",
|
"@angular/animations": "7.2.1",
|
||||||
|
"@angular/cdk": "7.2.1",
|
||||||
"@angular/common": "7.2.1",
|
"@angular/common": "7.2.1",
|
||||||
"@angular/compiler": "7.2.1",
|
"@angular/compiler": "7.2.1",
|
||||||
"@angular/core": "7.2.1",
|
"@angular/core": "7.2.1",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||||
import {
|
import {
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
|
@ -345,6 +346,11 @@ export class AddEditComponent implements OnInit {
|
||||||
u.showOptions = u.showOptions == null ? true : u.showOptions;
|
u.showOptions = u.showOptions == null ? true : u.showOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
drop(event: CdkDragDrop<string[]>) {
|
||||||
|
moveItemInArray(this.cipher.fields, event.previousIndex, event.currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
async organizationChanged() {
|
async organizationChanged() {
|
||||||
if (this.writeableCollections != null) {
|
if (this.writeableCollections != null) {
|
||||||
this.writeableCollections.forEach((c) => (c as any).checked = false);
|
this.writeableCollections.forEach((c) => (c as any).checked = false);
|
||||||
|
|
Loading…
Reference in New Issue