From 145d74cd6f4b9d7c93eea3a083c0b81a3ddd4a34 Mon Sep 17 00:00:00 2001 From: Amelia <77553571+Fesaa@users.noreply.github.com> Date: Fri, 20 Jun 2025 10:48:21 +0200 Subject: [PATCH] Don't auto fill destination values Instead, filter out empty destination values when updating. It ends up just filling in the first letter of the source, which is just awkward to work with --- .../manage-metadata-settings.component.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/UI/Web/src/app/admin/manage-metadata-settings/manage-metadata-settings.component.ts b/UI/Web/src/app/admin/manage-metadata-settings/manage-metadata-settings.component.ts index 5d0ed6566..d84478e92 100644 --- a/UI/Web/src/app/admin/manage-metadata-settings/manage-metadata-settings.component.ts +++ b/UI/Web/src/app/admin/manage-metadata-settings/manage-metadata-settings.component.ts @@ -190,7 +190,7 @@ export class ManageMetadataSettingsComponent implements OnInit { destinationValue: value.destinationValue, excludeFromSource: value.excludeFromSource } - }).filter(m => m.sourceValue.length > 0); + }).filter(m => m.sourceValue.length > 0 && m.destinationValue.length > 0); // Translate blacklist string -> Array return { @@ -231,15 +231,6 @@ export class ManageMetadataSettingsComponent implements OnInit { excludeFromSource: [mapping?.excludeFromSource || false] }); - // Autofill destination value if empty when source value loses focus - mappingGroup.get('sourceValue')?.valueChanges - .pipe( - filter(() => !mappingGroup.get('destinationValue')?.value) - ) - .subscribe(sourceValue => { - mappingGroup.get('destinationValue')?.setValue(sourceValue); - }); - //@ts-ignore this.fieldMappings.push(mappingGroup); }