X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-agent.git;a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fpages%2Fbuild%2Fsettings%2Fsdk-select-dropdown.component.ts;h=64de039b1842fa9f5ce5556f3000aa80fe67fcc5;hp=a9eafe766dc1c0ba306de332dfca379883a2f9b2;hb=319bdec474f655f415609c76a8e3b50b1d0b9aa4;hpb=635a25c98bb606d987fcd55cf697ea9f4a0b38b2 diff --git a/webapp/src/app/pages/build/settings/sdk-select-dropdown.component.ts b/webapp/src/app/pages/build/settings/sdk-select-dropdown.component.ts index a9eafe7..64de039 100644 --- a/webapp/src/app/pages/build/settings/sdk-select-dropdown.component.ts +++ b/webapp/src/app/pages/build/settings/sdk-select-dropdown.component.ts @@ -25,19 +25,15 @@ import { ISdk, SdkService, StatusType } from '../../../@core-xds/services/sdk.se template: `
- +
`, }) export class SdkSelectDropdownComponent implements OnInit { - // FIXME investigate to understand why not working with sdks as input - // - // @Input() sdks: ISdk[]; sdks: ISdk[]; - curSdk: ISdk; constructor(private sdkSvr: SdkService) { } @@ -50,13 +46,16 @@ export class SdkSelectDropdownComponent implements OnInit { this.sdks = s.filter(ss => ss.status === StatusType.INSTALLED); if (this.curSdk === null || s.indexOf(this.curSdk) === -1) { this.sdkSvr.setCurrent(this.curSdk = this.sdks.length ? this.sdks[0] : null); + this.curSdk = this.sdkSvr.getCurrent(); } } }); } select(s) { - this.sdkSvr.setCurrent(this.curSdk = s); + if (this.curSdk) { + this.sdkSvr.setCurrent(this.curSdk); + } } }