Skip to content

Commit

Permalink
[fixed] Put onClick on correct element on NavItem
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Oct 16, 2015
1 parent 44182b7 commit b64ed11
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/NavItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import classNames from 'classnames';
import React from 'react';

import BootstrapMixin from './BootstrapMixin';
import SafeAnchor from './SafeAnchor';
import createChainedFunction from './utils/createChainedFunction';

const NavItem = React.createClass({
mixins: [BootstrapMixin],
Expand All @@ -12,6 +14,7 @@ const NavItem = React.createClass({
active: React.PropTypes.bool,
disabled: React.PropTypes.bool,
href: React.PropTypes.string,
onClick: React.PropTypes.func,
role: React.PropTypes.string,
title: React.PropTypes.node,
eventKey: React.PropTypes.any,
Expand All @@ -33,6 +36,7 @@ const NavItem = React.createClass({
disabled,
active,
href,
onClick,
title,
target,
children,
Expand All @@ -46,11 +50,11 @@ const NavItem = React.createClass({
let linkProps = {
role,
href,
onClick: createChainedFunction(onClick, this.handleClick),
title,
target,
tabIndex,
id: linkId,
onClick: this.handleClick
id: linkId
};

if (!role && href === '#') {
Expand Down

0 comments on commit b64ed11

Please sign in to comment.