-
Notifications
You must be signed in to change notification settings - Fork 530
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
Switching active tabs programatically #430
Comments
You need to call it on the stack using the You could use a function such as |
Thanks for the reply ButchMonkey! I pinged a friend (@Methrend) for some help and we got the tab switching working. For anyone else who stumbles across this thread hunting for code examples (like I was), here's what we've got: The tabs we want to switch between have The function to switch them is as follows:
|
You do not need to get the stack beforehand.
|
Sadly this does not work, in my stack the tabs get highlighted but it never shows the actual content of the tab. On the creation of the tab I perform a search for the stacks with content children:
for testing I search for a hardcoded tab:
I receive no errors, the tabs gets highlighted though. What might I be missing? Thanks and regards |
If you want to make the tab active based on the component name this code above worked for me. |
Hi folks, I'm struggling a bit to figure out just how to use some of the functionality in GL.
I want to be able to switch between tabs in a stack programatically - I understand that for this I'd want to use
setActiveContentItem( contentItem )
as shown here.My problem is that I can't find any examples around for how to actually implement that. I've tried swapping out
contentItem
with the desired tab'scomponentName
to no avail.I'm currently trying to reverse engineer the code referenced here but am not having much luck.
How is this used? And is it possible for the documentation on this or other functions to be expanded a bit?
Cheers!
The text was updated successfully, but these errors were encountered: