When we try to update the view inside the tabview content by first showing an ActivityIndicator and after some time changing it to a simple Label, the Label will not be shown on iOS
iOS
https://play.nativescript.org/?template=play-ng&id=OowF7j
Just open the project and see the ActivityIndicator for five seconds, after which the Label should be displayed, but it is not.
home.component.ts
export class HomeComponent implements OnInit {
public isLoading: boolean = true;
public ngOnInit(): void {
setTimeout(() => {
this.isLoading = false;
}, 5000);
}
}
home.component.html
<TabView>
<StackLayout *tabItem="{ title: 'Tab1' }">
<GridLayout>
<ActivityIndicator *ngIf="isLoading" [busy]="true" horizontalAlignment="center" verticalAlignment="center">
</ActivityIndicator>
<Label *ngIf="!isLoading" text="First tab item"></Label>
</GridLayout>
</StackLayout>
<StackLayout *tabItem="{ title: 'Tab2' }">
<Label text="Second tab item"></Label>
</StackLayout>
</TabView>
@nickdekkers This seems to be the same problem as https://github.com/NativeScript/NativeScript/pull/5724 . It should be fixed in next. Can you switch to tns-core-modules@next and try it out?
@nickdekkers is this the Nick Deckers I know? Crazy coincidence if so. Did try out out @next? I'm having this same problem.
@MartoYankov I can confirm this is fixed in tns-core-modules@next. Thanks!!!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@MartoYankov I can confirm this is fixed in
tns-core-modules@next. Thanks!!!