-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Possibility to add non React-Tabs elements in <Tabs> #114
Comments
Sorry for the late reply. Where would you want to add the element? |
No problem, there is no hurry! I indeed didn't pay attention to the DOM elements used, so it will limit the options, but we could do something like that: <div class="ReactTabs>
<ul classReactTabs__TabList></ul>
<div class="ReactTabs__CustomElement"></div>
<div class="ReactTabs__TabPanel"></div>
</div> The element would be in the Here that would solve my problem, since the element would be positionned just after the |
This should be fixed by #123 which was released in 0.8.0. |
For me, #123 is working on succeeding elements, but not preceding ones. |
I opened a PR addressing my issue: #139 |
I was looking to have a structure like this: <Tabs>
<div id="tabs-nav-wrapper">
<button>Left</button>
<div className="tabs-container">
<TabList>...</TabList>
</div>
<button>Right</button>
</div>
{tabPanels}
</Tabs> Using the version 0.8.0 it works but I get the error message:
|
Nice layout, @maxcnunes, although it doesn't cover the case of having elements between If I remember correctly, I resolved the error you're seeing here: https://github.com/reactjs/react-tabs/pull/139/files#diff-9f7edeedc285e014eae31af85bb88a27L30 |
@alexanderwallin I will wait for your PR be merged to test it out. Thanks. |
Whats the status of this PR? |
Also looking for an update on this PR? @danez |
I too am looking for a similar resolution... In my case, I'd like to absolutely position an animation component within the Tabs component / over the TabPanels components. Everything functions correctly, however, I do get the following warning:
|
@jaegz Do you get that error with the current master or with the PR? |
@alexanderwallin current master - my bad, forgot to mention that. |
Alright! Does the PR solve your issue? |
To answer @alexanderwallin, I am using v1.0.0 and have the same layout as @maxcnunes, but am stilling receiving the error (and is in fact broken). v1.0.0 = Broken/UI not responding + Error |
The example from above is not supported yet. |
Hello there! Any news on being able to add other elements to the Tabs component? Trying to conditionally display multiple TabPanels throws, as the component won't allow nesting them in a div, for example. #180 should bring the lib one step closer to that, no? |
If anyone wants to try, I created a PR that should add support for this. #184 |
Released with 1.1.0 |
I'm looking to add an effect similar to the one used in material-ui tabs, with a div moving from one to the other. This specific example would require me to add an element in the DOM, and React-Tabs throw for that.
Would it be possible to change that? Perhaps adding a specific class to a div if you want to be sure that it's not made by mistake, or exporting another component that can be instanciated in the DOM? What's your take on it? I kind of like the second solution, seems to be cleaner.
I'm willing to submit a PR for that!
The text was updated successfully, but these errors were encountered: