Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(tab): show not being adhered to #6412

Closed
dylanvdmerwe opened this issue May 3, 2016 · 6 comments
Closed

bug(tab): show not being adhered to #6412

dylanvdmerwe opened this issue May 3, 2016 · 6 comments
Assignees

Comments

@dylanvdmerwe
Copy link
Contributor

Short description of the problem:

I need to hide or display a tab depending on the state of the application. It seems on iOS I cannot get the tab to hide once it has been displayed.

What behavior are you expecting?

The tab should hide/display based on the value of the [show] property as per the documentation.

HTML

<ion-tabs>
    <ion-tab [root]="tab2Root" tabTitle="Info" tabIcon="information-circle"></ion-tab>
    <ion-tab [root]="tab1Root" tabTitle="Prizes" tabIcon="trophy" [show]="competitionRunning"></ion-tab>
    <ion-tab [root]="tab3Root" tabTitle="Gallery" tabIcon="images"></ion-tab>
    <ion-tab [root]="tab4Root" tabTitle="Inbox " tabIcon="chatbubbles"  [tabBadge]="userState.unreadMessageCount" tabBadgeStyle="danger" ></ion-tab>
</ion-tabs>

TS

export class TabsPage {
  tab1Root: any = InvitePage;
  tab2Root: any = InfoPage;
  tab3Root: any = GalleryPage;
  tab4Root: any = InboxPage;

  competitionRunning: boolean = true;

  constructor(private userState : SystemUserState, private appState : ApplicationInfoState){

  } 

  onPageLoaded(){
      var university = this.appState.findUniversity(this.userState.universityId);
      this.competitionRunning = university.Competition.IsRunning;
  }
}

When competitionRunning is set to false or true in onPageLoaded on iOS, the tab will still be shown regardless. Tested on an actual device.

Which Ionic Version? 2.x

Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
OS:
Node Version: v5.10.1

@jgw96
Copy link
Contributor

jgw96 commented May 3, 2016

Hey @dylanvdmerwe ! Does this only happen on ios? Or Android too?

@jgw96 jgw96 added needs: reply the issue needs a response from the user v2 labels May 3, 2016
@dylanvdmerwe
Copy link
Contributor Author

dylanvdmerwe commented May 3, 2016

Hey @jgw96 . So far I have only observed this on iOS.

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label May 3, 2016
@dylanvdmerwe
Copy link
Contributor Author

Note that this is in reference to #5768

@jgw96
Copy link
Contributor

jgw96 commented May 9, 2016

Hey @dylanvdmerwe are you also seeing this in the browser when using ionic serve ? Also, if so, would you mind making a plunker of your exact code that i can use to reproduce this issue?

@dylanvdmerwe
Copy link
Contributor Author

Hey @jgw96

See plunkr here.

Please can you try this on an iOS device like I did.

@manucorporat manucorporat self-assigned this Oct 11, 2016
manucorporat added a commit that referenced this issue Oct 13, 2016
@manucorporat
Copy link
Contributor

I cannot longer reproduce this issue in RC1

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants