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

Allows arbitrary components anywhere inside <TabList> #139

Closed
wants to merge 3 commits into from

Conversation

alexanderwallin
Copy link

This is a follow-up feature to #123, which allowed adding arbitrary components after a <TabList>'s <Tab>s.

Now you can put components anywhere inside <TabList> and everything should work as expected.

My use case was that I needed a logo-ish before the tabs. Tab group separators is another example.

@danez
Copy link
Collaborator

danez commented Sep 28, 2016

Thanks for your contribution. What happened when you where trying to add a dom node infront of the tabs? did it crash?

@alexanderwallin
Copy link
Author

alexanderwallin commented Sep 28, 2016

The index was offset by 1 for each node, so with one preceding node the tab left to the one clicked would be selected. Also, navigating with the keyboard broke as the number of tabs (getTabsCount()) was incorrect.

I am getting an invariant error, though:

invariant.js:38 Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

@alexanderwallin
Copy link
Author

The invariant error seems to occur when I symlink my local fork of react-tabs using either npm link react-tabs or a Webpack alias.

Weird! Don't really know what's happening.

@alexanderwallin
Copy link
Author

Would be great if someone would try this out!

@alexanderwallin
Copy link
Author

Let me know if you need an extra hand reviewing issues and PRs, @danez!

@tazcarper
Copy link

Was this ever pulled into master? Any updates on it?

@danez
Copy link
Collaborator

danez commented Apr 13, 2017

Merged with 0a15604

@danez danez closed this Apr 13, 2017
@alexanderwallin
Copy link
Author

Sweet, @danez! Just out of curiosity, why not merge normally?

@danez
Copy link
Collaborator

danez commented Apr 15, 2017

I merged a lot of other changes before (especially the rewrite to native classes) and so everything was a conflict and I had to pick by hand.
Sorry that you are not in the git history now, but will mention everyone in the changelog.

@alexanderwallin
Copy link
Author

Ah, I see. No need to apologise, I was just interested in the circumstances. :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants