summaryrefslogtreecommitdiffstats
path: root/client/src/admin/helpers/onKeyPress.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/admin/helpers/onKeyPress.js')
-rw-r--r--client/src/admin/helpers/onKeyPress.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/admin/helpers/onKeyPress.js b/client/src/admin/helpers/onKeyPress.js
new file mode 100644
index 0000000..142a9cf
--- /dev/null
+++ b/client/src/admin/helpers/onKeyPress.js
@@ -0,0 +1,7 @@
+const onKeyPress = (e) => {
+ if (e.charCode === 13 || e.charCode === 32) {
+ e.target.click();
+ }
+}
+
+export default onKeyPress;