refactor: clean code
This commit is contained in:
parent
c6059a7a60
commit
42e454c4d6
@ -35,10 +35,11 @@ export class TabStorageComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tryCount >= 10)
|
if (tryCount < 10)
|
||||||
|
this.trySelectChip(index, chip, ++tryCount);
|
||||||
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.trySelectChip(index, chip, ++tryCount);
|
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,7 @@ export class GroupComponent implements IScheduleTab {
|
|||||||
}))
|
}))
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
this.faculties = data;
|
this.faculties = data;
|
||||||
|
|
||||||
if (this.selected !== null && this.selected.length >= 1) {
|
if (this.selected !== null && this.selected.length >= 1) {
|
||||||
let selectedFaculty = data.find(x => x.id === this.selected![0].index);
|
let selectedFaculty = data.find(x => x.id === this.selected![0].index);
|
||||||
|
|
||||||
|
@ -64,7 +64,9 @@ export class TabsComponent implements AfterViewInit {
|
|||||||
if (selected !== null)
|
if (selected !== null)
|
||||||
index = selected.type;
|
index = selected.type;
|
||||||
|
|
||||||
this.chooseTabs(index).then();
|
if (this.tabs.selectedIndex === null || this.tabs.selectedIndex === 0)
|
||||||
|
this.chooseTabs(0).then();
|
||||||
|
else
|
||||||
this.tabs.selectedIndex = index;
|
this.tabs.selectedIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user