Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fix: prevent the default action
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Woodward committed Aug 22, 2021
1 parent f95c72f commit 63fdcdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stories/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export function Input({
}}
onKeyDown={updateOn === UpdateOn.Blur ? (event) => {
if ((submitKeys as string[]).includes(event.key)) {
event.preventDefault();

onChange(internalValue);
}
} : null}
Expand Down

0 comments on commit 63fdcdf

Please sign in to comment.