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

enable controlled component behavior #80

Closed
wants to merge 2 commits into from

Commits on Feb 17, 2016

  1. enable controlled component behavior

    if you pass a `selectedIndex` prop, then that tab will be selected, no
    matter what. it doesn't change automatically from user interaction. to
    change in response to interaction, have the parent pass an `onSelect`
    handler that updates the `selectedIndex` prop.
    mziwisky committed Feb 17, 2016
    Configuration menu
    Copy the full SHA
    501f0c5 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2016

  1. more reliable focus management for controlled component

    previously, in order for focus management to work, we assumed the parent
    would rerender the tabs component when its onSelect handler was invoked.
    that was probably a pretty safe assumption, but we no longer rely on it.
    
    also made it more explicit (and enforced) that `selectedIndex` and
    `onSelect` come as a pair. and improved test coverage around this stuff.
    mziwisky committed Feb 19, 2016
    Configuration menu
    Copy the full SHA
    61dfa85 View commit details
    Browse the repository at this point in the history