Skip to content

Commit

Permalink
fix(@clayui/time-picker): stop propagating key events in time picker
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceosterhaus committed Feb 3, 2021
1 parent cabc457 commit 0e0d89b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/clay-time-picker/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const ClayTimePicker: React.FunctionComponent<IProps> = ({
break;
case 'ArrowUp':
event.preventDefault();
event.stopPropagation();

if (configName === TimeType.ampm) {
setValue((config as ConfigAmpm).pm);
Expand All @@ -225,6 +226,7 @@ const ClayTimePicker: React.FunctionComponent<IProps> = ({
break;
case 'ArrowDown':
event.preventDefault();
event.stopPropagation();

if (configName === TimeType.ampm) {
setValue((config as ConfigAmpm).am);
Expand Down

0 comments on commit 0e0d89b

Please sign in to comment.