flux-router-component
Advanced tools
Comparing version 0.5.6 to 0.5.7
@@ -14,2 +14,10 @@ /** | ||
function isLeftClickEvent (e) { | ||
return e.button === 0; | ||
} | ||
function isModifiedEvent (e) { | ||
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey); | ||
} | ||
NavLink = React.createClass({ | ||
@@ -27,2 +35,8 @@ displayName: 'NavLink', | ||
if (isModifiedEvent(e) || !isLeftClickEvent(e)) { | ||
// this is a click with a modifier or not a left-click | ||
// let browser handle it natively | ||
return; | ||
} | ||
var href = this.props.href; | ||
@@ -29,0 +43,0 @@ |
/** | ||
* Copyright 2014, Yahoo! Inc. | ||
* Copyright 2014-2015, Yahoo! Inc. | ||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. | ||
@@ -11,2 +11,3 @@ */ | ||
var History = require('./History'); | ||
var React = require('react'); | ||
var TYPE_CLICK = 'click'; | ||
@@ -34,2 +35,6 @@ var TYPE_PAGELOAD = 'pageload'; | ||
RouterMixin = { | ||
contextTypes: { | ||
executeAction: React.PropTypes.func, | ||
makePath: React.PropTypes.func | ||
}, | ||
componentDidMount: function() { | ||
@@ -36,0 +41,0 @@ var self = this; |
{ | ||
"name": "flux-router-component", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"description": "Router-related React component and mixin for applications with Flux architecture", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38760
541