From 2e2b9e44429d8db8423ac8892030f53129efb035 Mon Sep 17 00:00:00 2001 From: Lachlan Kermode Date: Tue, 30 Jun 2020 14:04:47 +0200 Subject: [PATCH] up and down arrows for movement --- src/components/Layout.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Layout.js b/src/components/Layout.js index 1d4d89f..37ba4fd 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -213,10 +213,12 @@ class Dashboard extends React.Component { const idx = this.findEventIdx(ev) switch (e.keyCode) { case 37: // left arrow + case 38: // up arrow if (idx <= 0) return prev(idx) break case 39: // right arrow + case 40: // down arrow if (idx < 0 || idx >= this.props.domain.length - 1) return next(idx) break