Skip to content

Commit fd9a863

Browse files
authored
feat: sort (#73)
1 parent d7df35a commit fd9a863

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,17 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
157157
};
158158

159159
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
160-
onKeyDown?.(e);
161160
if (onPressEnter && e.key === 'Enter' && !keyLockRef.current) {
162161
keyLockRef.current = true;
163162
onPressEnter(e);
164163
}
164+
onKeyDown?.(e);
165165
};
166166
const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>) => {
167-
onKeyUp?.(e);
168167
if (e.key === 'Enter') {
169168
keyLockRef.current = false;
170169
}
170+
onKeyUp?.(e);
171171
};
172172

173173
const handleFocus: React.FocusEventHandler<HTMLInputElement> = (e) => {

0 commit comments

Comments
 (0)