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
This commit is contained in:
parent
1b54b004db
commit
145d74cd6f
1 changed files with 1 additions and 10 deletions
|
|
@ -190,7 +190,7 @@ export class ManageMetadataSettingsComponent implements OnInit {
|
||||||
destinationValue: value.destinationValue,
|
destinationValue: value.destinationValue,
|
||||||
excludeFromSource: value.excludeFromSource
|
excludeFromSource: value.excludeFromSource
|
||||||
}
|
}
|
||||||
}).filter(m => m.sourceValue.length > 0);
|
}).filter(m => m.sourceValue.length > 0 && m.destinationValue.length > 0);
|
||||||
|
|
||||||
// Translate blacklist string -> Array<string>
|
// Translate blacklist string -> Array<string>
|
||||||
return {
|
return {
|
||||||
|
|
@ -231,15 +231,6 @@ export class ManageMetadataSettingsComponent implements OnInit {
|
||||||
excludeFromSource: [mapping?.excludeFromSource || false]
|
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
|
//@ts-ignore
|
||||||
this.fieldMappings.push(mappingGroup);
|
this.fieldMappings.push(mappingGroup);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue