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

Config.set is not working with tabsHideOnSubPages #8970

Closed
royipressburger opened this issue Oct 31, 2016 · 10 comments
Closed

Config.set is not working with tabsHideOnSubPages #8970

royipressburger opened this issue Oct 31, 2016 · 10 comments
Assignees

Comments

@royipressburger
Copy link

Short description of the problem:

When initialising the application with tabsHideOnSubPages: true
If trying to change the value dynamically with config.set there is no effect.

Steps to reproduce:

  1. start a tabs project
  2. before pushing a new page do this.config.set('tabsHideOnSubPages', false)

Which Ionic Version? 1.x or 2.x
2.rc1

Plunker that shows an example of your issue

http://plnkr.co/edit/LLnXgkRnxLeY1PItgual?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a

@jgw96 jgw96 added the v2 label Oct 31, 2016
@manucorporat
Copy link
Contributor

@royipressburger It is not a good idea to change configuration values at runtime. what's your use case?

@manucorporat manucorporat self-assigned this Nov 1, 2016
@royipressburger
Copy link
Author

@manucorporat Hi, I want to be able to show the tabs bar on some pages that are being pushed to the nav stack.
By default im using tabsHideOnSubPages = true but there are few pages that I still want to show the tabs.

@royipressburger
Copy link
Author

royipressburger commented Nov 1, 2016

Hi again @manucorporat Is see the commit you referred too.
As this solve some of the issue but there is still something that Im not quite sure how to do.

lets assume that I have a tab page with 2 buttons, each one pushes a new page to the stack.
If I use the feature you added I guess that both pages will have (or not have, depending on the tabsHideOnSubPages value) tabs in them.
If I want one to have tabs and the other not to have?

@manucorporat
Copy link
Contributor

manucorporat commented Nov 1, 2016

@royipressburger ok... I see your use case. It can be done. But it is a tricky one from a API perspective.

maybe something like:

this.nav.push(Page, {
  tabsHideOnSubPages: true
});

NOTE this will not work, it just an idea of how we could make it work...
Thinking...

@royipressburger
Copy link
Author

royipressburger commented Nov 1, 2016

@manucorporat This thing can work, But this might cause a little confusion with the NavParams.
Maybe we can make it nested under pageOptions?

this.nav.push(Page, { pageOptions: { ConfigLikeObject } })

With this I think it will be easier to extend all the config object like animation and maybe mode under specific page

What do you think?

EDIT:
In second thought I think this will be best a 3rd parameter:
this.nav.push(Page, navParams, configLikeObject)

@manucorporat
Copy link
Contributor

sure, it should be in the 3rd parameter. I just forgot the API :)

@royipressburger
Copy link
Author

@manucorporat The commit you referred too will give me the option to keep/hide the tabs per tab page? I mean if I got the default set to false and on one tab i change to true, every page that will be pushed from this tab will have the tabs?
Can I expect this on rc2?

@royipressburger
Copy link
Author

@manucorporat Any news on that?

@manucorporat
Copy link
Contributor

@royipressburger I am sorry for the inconvenience, but let's evaluate this once 2.0 final is released. It is a big internal change if we want to support your use case, and it is too late for new features or big changes.

@ionitron-bot
Copy link

ionitron-bot bot commented Mar 26, 2018

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

@ionitron-bot ionitron-bot bot closed this as completed Mar 26, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 26, 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

3 participants