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

Features: React 0.14; Specifying visible index for tab panel #6

Open
oyeanuj opened this issue Dec 21, 2015 · 6 comments
Open

Features: React 0.14; Specifying visible index for tab panel #6

oyeanuj opened this issue Dec 21, 2015 · 6 comments

Comments

@oyeanuj
Copy link

oyeanuj commented Dec 21, 2015

Hi @eschaefer! I was trying to make a decision on what react-tab component to use - I really like the simplicity of what you have but there are a couple of features that would be really helpful. I was wondering if you have any plans to add the following features -

  1. React 0.14 compatibility.
  2. Specify which tab index to show by default. Right now, it seems that the first one is selected by default. It seems like this functionality could be allowed by just exposing visibleIndex as a prop. Thoughts?
  3. Do the above, but dynamically. A good use-case is an interaction from the first tab that needs the second tab to be shown. Again, this could be achieved by exposing visibleIndex as a prop, I believe.

PS. Thank you for your quick response on #5!

Thank you!

@oyeanuj oyeanuj changed the title Dynamic selection of tab panel Specify visible index for tab panel Dec 21, 2015
@oyeanuj oyeanuj changed the title Specify visible index for tab panel React 0.14; Specifying visible index for tab panel Dec 22, 2015
@oyeanuj oyeanuj changed the title React 0.14; Specifying visible index for tab panel Features: React 0.14; Specifying visible index for tab panel Dec 22, 2015
@KittyGiraudel
Copy link
Contributor

Yo! We will be moving the tab system to regular anchors for accessibility reasons (see #11), so you’ll be able to move from one tab to the other just by having a link anchoring to a specific tab. Regarding the initial index, we’re on it. :)

@KittyGiraudel
Copy link
Contributor

Regarding React 0.14 compatibility, as far as I can tell the only difference is with ReactDOM.render(..) instead of React.render(..). Any idea how we could support both? Also, it’s not an error but a warning, so everything works fine on my end in React 0.14.

@oyeanuj
Copy link
Author

oyeanuj commented Dec 22, 2015

Regarding React 0.14 compatibility... Any idea how we could support both?

Most packages seem to offer two versions, an older version that works with 0.13 and a newer one with 0.14. Most of the updates that they then do are on the newer version which supports 0.14.

We will be moving the tab system to regular anchors for accessibility reasons (see #11), so you’ll be able to move from one tab to the other just by having a link anchoring to a specific tab.

If you are doing anchor tags, does that also mean changing tabs will change the url in the address bar/history?

Regarding the initial index, we’re on it. :)

Great, thank you!

@KittyGiraudel
Copy link
Contributor

If you are doing anchor tags, does that also mean changing tabs will change the url in the address bar/history?

Done.

@oyeanuj
Copy link
Author

oyeanuj commented Dec 22, 2015

Okay, the only thing I can think of is cases where a developer might be using the tabs within another component or some part of the page. In that case, they might not want to have the url change change in the address bar/history.

Thoughts?

@KittyGiraudel
Copy link
Contributor

I disagree. I think hash-based navigation is a key part of a tabbing system.

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

No branches or pull requests

2 participants