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

Greater control over Tab #119

Closed
mkatanec-croz opened this issue Jul 5, 2023 · 2 comments
Closed

Greater control over Tab #119

mkatanec-croz opened this issue Jul 5, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@mkatanec-croz
Copy link
Contributor

Basic information

  • Tiller version: 1.6.1
  • Module: core

Enhancement description

Enable greater control over Tabs. Reach Tabs has prop index for setting index of currently selected tab. This will enable user to control Tabs component from outside of it.

Current behaviour

For tabs control Tabs component only has defaultIndex prop

Wanted behaviour

Tabs component has two additional props that are not required, index and onTabChange that will be passed to Reach Tabs component. There can even be a Hook useTabs that will return currentIndex, function for changing index and a hook that can be passed to Tabs component. hook would contain index and onTabChange which means that useTabs hook would also handle manual tab index management

@mkatanec-croz mkatanec-croz added the enhancement New feature or request label Jul 5, 2023
@jtomic-croz
Copy link
Collaborator

@mkatanec-croz Valid issue. Currently, alternative is using something like <Tabs defaultIndex={currentIndex} key={currentIndex}>.

mkatanec pushed a commit to mkatanec/tiller that referenced this issue Aug 2, 2023
Added index and onTabChange props to Tab for grater crotrol

ref: croz-ltd#119
jtomic-croz pushed a commit that referenced this issue Aug 9, 2023
Added index and onTabChange props to Tab for grater crotrol

ref: #119
@jtomic-croz
Copy link
Collaborator

Released in 1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants