26 Jul 2012 6:57 AM #1
Ext.navigation.View creates navigation bar when navigationBar config set false
Hey all, very quick bug hence not using the full format; let me know if you need it or more info.
I'm using a navigation view to make for easy transitions between a login form and another (main) navigation view (I know I could use a container with a card layout, but I didn't feel like creating push and pop methods or using setActiveItem). In the config for this navigation view I set "navigationBar: false". This works in that it hides the navigation bar from view, but it still creates the component, wasting resources.
I tried destroying the navigation bar manually (on initialize, on painted, etc.), yet it always came back (or never left in the first place)! The only way I could get rid of it was to set navigationBar to null instead of false, however, this broke the entire navigation view.
I understand from delving into the source code in the past that the navigation bar is very closely tied into the navigation view (what with the back button stack trace and all), but I think the option should probably be available to use a navigation view without the bar, otherwise we're simply rewriting code if we want push and pop functions.
For now, I switched to using a Container with a card layout and that's working fine, but it's less convenient.
26 Jul 2012 10:21 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
I'm not sure why you would use a navigation view without a navigation bar. What's wrong with using a Container with card layout?Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
26 Jul 2012 10:44 AM #3
Besides, the thing that bothered me more was the inconsistency. If a navigation view requires a navigation bar to work, you should not be able to set its config to false in the first place. It should only accept non-null configurations and simply clarify in the documentation that if you want a navigation view without a toolbar you should use a container with a card layout. It seems silly (and inefficient) to be able to hide the toolbar but not destroy it.
Idk, just my two cents.