PDA

View Full Version : [CLOSED] Hiding tabs



Z
Oct 11, 2017, 8:37 AM
In this example: http://mvc.mobile.ext.net/#demo/bottom-tabs

How can I hide the tabs in Javascript. When i hide the tab, the icon should disappear from the bottom bar.
I for the life of me cant get it to work :)

i tried App.tabbar.child(#idOfTab).tab.hide()

thanks,
/Z

fabricio.murta
Oct 11, 2017, 4:36 PM
Hello @Z!

I'm not entirely sure I understand your needs but this is my best shot: you can't hide, but remove/add tabs.

Why? Tabs are but a collection of panels, in which inactive tabs are but the "hidden" panels, and only one panel in the "group" can be in the "shown" status at a given time, all other panels are hidden.

If you mean to hide just the tab handle for that panel, maybe moving the panel to an invisible container should do, but design-wise, it is expected that any panel inside a tab panel should have their tab handles displayed.

I hope I understood correctly your question. If not, would you mind elaborating on the question?

Z
Oct 11, 2017, 7:05 PM
that makes a lot of sense

so tabPanel.remove(panel) works just fine

thxs
/Z

fabricio.murta
Oct 13, 2017, 12:19 AM
Hello @Z!

Glad it helped, thanks for the feedback!