Skip to content
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

How to get current tab from outside the TabContext? #71

Closed
2 tasks
alexpchin opened this issue Jan 30, 2021 · 1 comment · Fixed by #75
Closed
2 tasks

How to get current tab from outside the TabContext? #71

alexpchin opened this issue Jan 30, 2021 · 1 comment · Fixed by #75
Labels
question Further information is requested

Comments

@alexpchin
Copy link
Contributor

  • How to get the currently focused tab from refMap, previously you could use navigationState.index?
  • How to listen to the change of the tab? (Connected to above)

If you want to conditionally display content based on the current tab, or you just want to know for some logic which tab is currently focused, you used to be able to work this out from navigationState.

@alexpchin alexpchin added the question Further information is requested label Jan 30, 2021
@PedroBern
Copy link
Owner

How to get the currently focused tab from refMap, previously you could use navigationState.index?
How to listen to the change of the tab? (Connected to above)

#58 will add onIndexChange prop, here, and the imperative ref handler here, maybe we can add more methods to it, like currectTab: () => focusedTab .value and currentIndex: () => index.value

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
2 participants