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
rubenf12mo ago
you have to use the function setTab
Trevor Sullivan
Trevor Sullivan12mo ago
FYI that isn't showing in the auto-complete, so I didn't know it was an option
No description
No description
rubenf
rubenf12mo ago
👍 will fix
Trevor Sullivan
Trevor Sullivan12mo ago
No description
rubenf
rubenf12mo ago
it's not tabs.setTab
Trevor Sullivan
Trevor Sullivan12mo ago
Oh ... setTab() isn't declared on the Tab component. It's a global function
rubenf
rubenf12mo ago
yes
Trevor Sullivan
Trevor Sullivan12mo ago
Ignore auto-complete message then 😆
Trevor Sullivan
Trevor Sullivan12mo ago
This still has no effect. No errors either.
No description
Trevor Sullivan
Trevor Sullivan12mo 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 Sullivan12mo ago
Working fine now!
Want results from more Discord servers?
Add your server
More Posts