in toolings/tfjs-debugger/src/app/components/input_selector/input_selector.component.ts [75:101]
ngOnInit() {
// Add "Same as configuration 1" option when the input selector is used in
// the configuration 2.
if (this.configIndex === 1) {
this.inputTypes.unshift({
id: InputTypeId.SAME_AS_CONFIG1,
label: 'Same as configuration 1',
});
}
// Update currently selected input type from URL.
this.store
.select(selectConfigValueFromUrl(
this.configIndex, UrlParamKey.SELECTED_INPUT_TYPE_ID))
.pipe(takeWhile(() => this.active))
.subscribe((strId) => {
// The first one is the default.
let inputTypeId = this.inputTypes[0].id;
if (strId != null) {
inputTypeId = strId;
}
this.selectedInputTypeId = inputTypeId;
this.changeDetectorRef.markForCheck();
// TODO: update configs in store.
});
}