Skip to content

Commit

Permalink
Fix: [OV-44493] - action menu - fixed keyboard navigation (#440)
Browse files Browse the repository at this point in the history
* Fix: [OV-44493] - action menu - fixed keyboard navigation
  • Loading branch information
vicky-comeau committed Jun 19, 2023
1 parent 0482ec6 commit 957387b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-clouds-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@igloo-ui/action-menu': patch
---

Other props for the action menu reference were overriding the onKeyDown event. Rearranged the order to fix this.
6 changes: 4 additions & 2 deletions packages/ActionMenu/src/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,12 @@ const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({
onClose={() => toggleMenu(false)}
renderReference={(refProps: React.HTMLProps<HTMLButtonElement>) => {
return renderReference({
...refProps,
onClick: () => toggleMenu(!showMenu),
onKeyDown: handleOnKeyDown,
onKeyDown: (e) => {
handleOnKeyDown(e);
},
className: 'ids-action-menu__trigger',
...refProps,
});
}}
/>
Expand Down

0 comments on commit 957387b

Please sign in to comment.