FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Change detection on tabview content is not working (iOS) · Issue #5771 · NativeScript/NativeScript · GitHub

Change detection on tabview content is not working (iOS) #5771

Description

Tell us about the problem

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

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.0.0
  • Cross-platform modules: 4.0.0
  • Runtime(s): 4.0.1 for iOS and Android
  • Plugin(s): none

Please tell us how to recreate the issue in as much detail as possible.

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.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL