Skip to content

Tabs Component showing underline on wrong tab #17452

@bobstoovee

Description

@bobstoovee

When there is a condition component which either renders a tab or null as a child of component the underline is show on the next tab. ie:

image

There was a fix #8107 for {null} children of tabs, but that fix does not account for the edge case where the conditional logic is hidden within a component. For example,

image

This component will render "null" but it will be picked up as a valid child since the component is using React.isValidElement() to verify against a null, and this is a valid child.(probably should only count children that are tabs, and ignore other elements which shouldn't be there.

image

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Environment, Create React App, Node 12, google chrome, javascript (not typescript)

Metadata

Metadata

Assignees

No one assigned

    Labels

    not plannedThe problem seems valid, but we don't intend to fix it (won't fix).scope: tabsChanges related to the tabs.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions