Skip to content

Commit

Permalink
fix: focus on cell when pressing shift tab
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlahti committed Mar 31, 2023
1 parent bcc15a4 commit aed66c4
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,18 @@ export function getListboxInlineKeyboardNavigation({
}

const container = event.currentTarget.closest('.listbox-container');
const inSelection = isModal();

switch (keyCode) {
case KEYS.TAB:
if (shiftKey) {
focusRow(container) || focusSearch(container);
if (inSelection) {
if (shiftKey) {
focusRow(container) || focusSearch(container);
} else {
focusSearch(container) || focusRow(container);
}
} else if (shiftKey) {
keyboard.blur(true);
} else {
focusSearch(container) || focusRow(container);
}
Expand Down

0 comments on commit aed66c4

Please sign in to comment.