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

Allow Tabs to be controllable #970

Merged
merged 5 commits into from
Dec 1, 2021
Merged

Allow Tabs to be controllable #970

merged 5 commits into from
Dec 1, 2021

Commits on Dec 1, 2021

  1. Configuration menu
    Copy the full SHA
    752b4e3 View commit details
    Browse the repository at this point in the history
  2. fix falsy bug

    `selectedIndex || defaultIndex` would result in the `defaultIndex` if
    `selectedIndex` is set to 0. This means that if you have this code:
    
    ```js
    <Tab.Group selectedIndex={0} defaultIndex={2} />
    ```
    
    That you will never be able to see the very first tab, unless you
    provided a negative value like `-1`.
    
    `selectedIndex ?? defaultIndex` fixes this, since it purely checkes for
    `undefined` and `null`.
    RobinMalfait committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    02206fe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1261298 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5538d69 View commit details
    Browse the repository at this point in the history
  5. update changelog

    RobinMalfait committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    8efb705 View commit details
    Browse the repository at this point in the history