From 86a540e68e44ad51a9abbdd687e9c622eec84969 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 15 Sep 2024 08:02:38 -0700 Subject: [PATCH] Fix: filter out shown custom fields that have been deleted from saved view edit (#7710) --- .../input/drag-drop-select/drag-drop-select.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts index 3cf0264f9..6225ef3b7 100644 --- a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts +++ b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts @@ -38,7 +38,9 @@ export class DragDropSelectComponent extends AbstractInputComponent { 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) {