1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

Add support for CdkDragDrop in add-edit.component.js (#35)

This commit is contained in:
Kovah
2019-03-27 19:22:59 +01:00
committed by Kyle Spearrin
parent a884f77938
commit 19516c20ff
3 changed files with 16 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
import {
EventEmitter,
Input,
@@ -345,6 +346,11 @@ export class AddEditComponent implements OnInit {
u.showOptions = u.showOptions == null ? true : u.showOptions;
}
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.cipher.fields, event.previousIndex, event.currentIndex);
}
async organizationChanged() {
if (this.writeableCollections != null) {
this.writeableCollections.forEach((c) => (c as any).checked = false);