Skip to content

Commit

Permalink
fix: add inputProps.onKeyDown
Browse files Browse the repository at this point in the history
  • Loading branch information
linyonglu committed Feb 27, 2025
1 parent b220038 commit 03c71ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/input/src/use-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
),
"aria-readonly": dataAttr(originalProps.isReadOnly),
onChange: chain(inputProps.onChange, onChange),
onKeyDown: chain(props.onKeyDown, handleKeyDown),
onKeyDown: chain(inputProps.onKeyDown, props.onKeyDown, handleKeyDown),
ref: domRef,
};
},
Expand Down
2 changes: 1 addition & 1 deletion packages/components/number-input/src/use-number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
),
"aria-readonly": dataAttr(originalProps.isReadOnly),
onChange: chain(inputProps.onChange, onChange),
onKeyDown: chain(props.onKeyDown, handleKeyDown),
onKeyDown: chain(inputProps.onKeyDown, props.onKeyDown, handleKeyDown),
ref: domRef,
};
},
Expand Down

0 comments on commit 03c71ed

Please sign in to comment.