use-keyboard-shortcut
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -14,2 +14,5 @@ import { useEffect, useCallback, useReducer } from "react"; | ||
return keyUpState; | ||
case "reset-keys": | ||
const resetState = { ...action.data }; | ||
return resetState; | ||
default: | ||
@@ -85,3 +88,4 @@ return state; | ||
if (!Object.values(keys).filter(value => !value).length) { | ||
callback(keys) | ||
callback(keys); | ||
setKeys({ type: "reset-keys", data: initalKeyMapping }); | ||
} else { | ||
@@ -88,0 +92,0 @@ setKeys({ type: null }) |
{ | ||
"name": "use-keyboard-shortcut", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A custom React hook for adding keyboard shortcuts to your application", | ||
@@ -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
13598
143