Tab Component: How do you select a different tab, when using "Invisible on View"?

If I create a Tab component, and select the "Invisible on View" display mode, how do I cause a different tab to be displayed? I tried using this front-end code, but it doesn't have any effect on the tabbed interface:
tabs.selectedTabIndex = 1;
tabs.selectedTabIndex = 1;
No description
11 Replies
rubenf
rubenf2y ago
you have to use the function setTab
Trevor Sullivan
Trevor SullivanOP2y ago
FYI that isn't showing in the auto-complete, so I didn't know it was an option
No description
No description
rubenf
rubenf2y ago
👍 will fix
Trevor Sullivan
Trevor SullivanOP2y ago
No description
rubenf
rubenf2y ago
it's not tabs.setTab
Trevor Sullivan
Trevor SullivanOP2y ago
Oh ... setTab() isn't declared on the Tab component. It's a global function
rubenf
rubenf2y ago
yes
Trevor Sullivan
Trevor SullivanOP2y ago
Ignore auto-complete message then 😆
Trevor Sullivan
Trevor SullivanOP2y ago
This still has no effect. No errors either.
No description
Trevor Sullivan
Trevor SullivanOP2y ago
Just found the documentation .... the setTab() function has two parameters, first one is the name of the component. I wish it threw an error for me, so I would realize that 🙂
No description
Trevor Sullivan
Trevor SullivanOP2y ago
Working fine now!