Skip to content

Commit

Permalink
fix(query-builder): Ignore arrow up/down behavior when a token is foc…
Browse files Browse the repository at this point in the history
…used (#72690)

Small fix for a bug which was introduced after adding the cmd+a
behavior. Arrow up/down wanted to focus or select a different item, but
we should ignore it instead.
  • Loading branch information
malwilley authored Jun 13, 2024
1 parent c6e975c commit f7fc4d2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ export function useQueryBuilderGrid(
}
}

originalGridProps.onKeyDown?.(e);
switch (e.key) {
// Default behavior for these keys is to move the focus, which we don't want
case 'ArrowUp':
case 'ArrowDown':
break;
default:
originalGridProps.onKeyDown?.(e);
}
},
[dispatch, originalGridProps, query, state.collection, state.selectionManager]
);
Expand Down

0 comments on commit f7fc4d2

Please sign in to comment.