Skip to content

GenericLink add onKeyDown handler. #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
GenericLink add onKeyDown handler.
  • Loading branch information
afrisalyp committed Jul 24, 2019
commit 42613cf38b32e463e17968a3f6fe5bf51f1c2ba7
2 changes: 2 additions & 0 deletions src/shared/components/GenericLink/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function GenericLink(props) {
enforceA,
onClick,
onMouseDown,
onKeyDown,
openNewTab,
replace,
routerLinkType,
Expand All @@ -42,6 +43,7 @@ export default function GenericLink(props) {
href={to}
onClick={disabled ? e => e.preventDefault() : onClick}
onMouseDown={disabled ? e => e.preventDefault() : onMouseDown}
onKeyDown={disabled ? e => e.preventDefault() : onKeyDown}
rel="noopener noreferrer"
styleName="link"
target={openNewTab ? '_blank' : ''}
Expand Down