]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: filter out shown custom fields that have been deleted from saved view edit ...
authorshamoon <4887959+shamoon@users.noreply.github.com>
Sun, 15 Sep 2024 15:02:38 +0000 (08:02 -0700)
committerGitHub <noreply@github.com>
Sun, 15 Sep 2024 15:02:38 +0000 (08:02 -0700)
src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts

index 3cf0264f96aef2be539f6a0eb8de8c8cf700d85a..6225ef3b7c08b9f8ee4098d4d1600f558e1af6b9 100644 (file)
@@ -38,7 +38,9 @@ export class DragDropSelectComponent extends AbstractInputComponent<string[]> {
   writeValue(newValue: string[]): void {
     super.writeValue(newValue)
     this.selectedItems =
-      newValue?.map((id) => this.items.find((i) => i.id === id)) ?? []
+      newValue
+        ?.map((id) => this.items.find((i) => i.id === id))
+        .filter((item) => item) ?? []
   }
 
   public drop(event: CdkDragDrop<string[]>) {