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

feat(react): Allow Tab Component to be controlled #909

Closed
wants to merge 1 commit into from
Closed

feat(react): Allow Tab Component to be controlled #909

wants to merge 1 commit into from

Conversation

ChiefORZ
Copy link
Contributor

@ChiefORZ ChiefORZ commented Nov 4, 2021

It was not possible to controll the selected tab from the outside.
Here is a example: https://codesandbox.io/s/headlessui-tab-uncontrolled-m2v5p

With this change, we can pass a selectedIndex to the Tab.Group Component.

@vercel
Copy link

vercel bot commented Nov 4, 2021

@ChiefORZ is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

@VladSez
Copy link

VladSez commented Nov 10, 2021

Hi, @RobinMalfait, thanks for your work on headless ui. Any chance this pr will get merged?

@trankhacvy
Copy link

@ChiefORZ Do you have any workaround for this issue?

@ChiefORZ
Copy link
Contributor Author

ChiefORZ commented Nov 22, 2021

@trankhacvy we copied the whole component into our project

@RigoOnRails
Copy link

Would love to see this merged. @RobinMalfait

@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

This was merged in #970 and will get a new version out asap.

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

Successfully merging this pull request may close these issues.

5 participants