diff --git a/tdrs-frontend/src/assets/Reports.scss b/tdrs-frontend/src/assets/Reports.scss index 0c6de7dfb..946e9ece6 100644 --- a/tdrs-frontend/src/assets/Reports.scss +++ b/tdrs-frontend/src/assets/Reports.scss @@ -47,6 +47,7 @@ border: none; color: #264A64; text-align: left; + text-decoration: underline; margin: 0; padding: 0; } diff --git a/tdrs-frontend/src/components/Modal/Modal.jsx b/tdrs-frontend/src/components/Modal/Modal.jsx index eb2b0d87c..323639f9b 100644 --- a/tdrs-frontend/src/components/Modal/Modal.jsx +++ b/tdrs-frontend/src/components/Modal/Modal.jsx @@ -24,18 +24,17 @@ const Modal = ({ title, message, buttons = [], isVisible = false }) => { (b) => b.key === selectedButtonKey ) + const btnIdxMinOne = Math.max(0, buttons.length - 1) if (shiftKey) { // go backward + const selectedIdxMinOne = Math.max(0, selectedButtonIndex - 1) nextButtonIndex = - selectedButtonIndex >= 0 - ? selectedButtonIndex - 1 - : buttons.length - 1 + selectedButtonIndex >= 0 ? selectedIdxMinOne : btnIdxMinOne } else { nextButtonIndex = - selectedButtonIndex < buttons.length - 1 ? selectedButtonIndex + 1 : 0 + selectedButtonIndex < btnIdxMinOne ? selectedButtonIndex + 1 : 0 } } - const nextButtonKey = buttons[nextButtonIndex].key const nextButton = modalRef.current.querySelector( `button[buttonkey="${nextButtonKey}"]` @@ -45,7 +44,6 @@ const Modal = ({ title, message, buttons = [], isVisible = false }) => { const onKeyDown = (e) => { const { key, shiftKey } = e - switch (key) { case 'Tab': onTabPressed(shiftKey)