Skip to content

Commit

Permalink
fix: fix onBlur/onFocus type define error in TextArea (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
YyumeiZhang authored May 29, 2024
1 parent c646fe9 commit e1b8717
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/semi-ui/input/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTex
showClear?: boolean;
onClear?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
onChange?: (value: string, e: React.MouseEvent<HTMLTextAreaElement>) => void;
onBlur?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
onFocus?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
onInput?: (e: React.MouseEvent<HTMLTextAreaElement>) => void;
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
onKeyUp?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
Expand Down Expand Up @@ -145,8 +145,8 @@ class TextArea extends BaseComponent<TextAreaProps, TextAreaState> {
this.props.onChange(val, e);
},
notifyClear: (e: React.MouseEvent<HTMLTextAreaElement>) => this.props.onClear(e),
notifyBlur: (val: string, e: React.MouseEvent<HTMLTextAreaElement>) => this.props.onBlur(e),
notifyFocus: (val: string, e: React.MouseEvent<HTMLTextAreaElement>) => this.props.onFocus(e),
notifyBlur: (val: string, e: React.FocusEvent<HTMLTextAreaElement>) => this.props.onBlur(e),
notifyFocus: (val: string, e: React.FocusEvent<HTMLTextAreaElement>) => this.props.onFocus(e),
notifyKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
this.props.onKeyDown(e);
},
Expand Down

0 comments on commit e1b8717

Please sign in to comment.