Skip to content

Commit

Permalink
Fixes an issue of setting isNavItemHighlighted in wrong state
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Jun 12, 2018
1 parent 4fd49b6 commit 49c8c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NavItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ class NavItem extends PureComponent {
});

const isNavItemSelected = active || (!!selected && selected === this.props.eventKey) || (activeNavItems.length > 0);
const isNavItemHighlighted = expanded || isNavItemSelected;
const isNavItemExpandable = (navItems.length > 0);
const isNavItemExpanded = isNavItemExpandable && expanded;
const isNavItemHighlighted = isNavItemExpanded || isNavItemSelected;

return (
<Component
Expand Down

0 comments on commit 49c8c31

Please sign in to comment.