UI: Fixed updated custom mapper URL when view OAuth 2.0 clients

This commit is contained in:
Vladyslav_Prykhodko 2024-11-08 11:14:48 +02:00
parent d66a3297b9
commit 37a0c2e19e

View File

@ -214,7 +214,11 @@ export class ClientComponent extends EntityComponent<OAuth2Client, PageLink, OAu
const mapperConfig = control.get('mapperConfig') as UntypedFormGroup; const mapperConfig = control.get('mapperConfig') as UntypedFormGroup;
if (type === MapperType.CUSTOM) { if (type === MapperType.CUSTOM) {
mapperConfig.removeControl('basic'); mapperConfig.removeControl('basic');
mapperConfig.addControl('custom', this.formCustomGroup(predefinedValue?.custom)); if (!mapperConfig.get('custom')) {
mapperConfig.addControl('custom', this.formCustomGroup(predefinedValue?.custom));
} else {
mapperConfig.get('custom').patchValue(predefinedValue.custom, {emitEvent: false});
}
} else { } else {
mapperConfig.removeControl('custom'); mapperConfig.removeControl('custom');
if (!mapperConfig.get('basic')) { if (!mapperConfig.get('basic')) {