mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Add support for CdkDragDrop in add-edit.component.js (#35)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user