Comparing version 1.3.3 to 1.4.0
@@ -61,2 +61,14 @@ 'use strict'; | ||
}, | ||
handleKeyDown: function handleKeyDown(e) { | ||
if (e.keyCode === 37) { | ||
this.setState({ | ||
checked: false | ||
}); | ||
} | ||
if (e.keyCode === 39) { | ||
this.setState({ | ||
checked: true | ||
}); | ||
} | ||
}, | ||
render: function render() { | ||
@@ -78,2 +90,4 @@ var _classNames; | ||
{ className: switchClassName, | ||
tabIndex: '0', | ||
onKeyDown: this.handleKeyDown, | ||
onClick: disabled ? noop : this.toggle, | ||
@@ -80,0 +94,0 @@ style: style }, |
{ | ||
"name": "rc-switch", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "switch ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
10241
234
1