mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix: select type definition (#12865)
* fix: select type definition * fix: wrapPicker type definition * fix: select type definition
This commit is contained in:
parent
ca11e2de00
commit
72a6febcc4
@ -31,8 +31,8 @@ export interface AutoCompleteProps extends AbstractSelectProps {
|
||||
optionLabelProp?: string;
|
||||
onChange?: (value: SelectValue) => void;
|
||||
onSelect?: (value: SelectValue, option: Object) => any;
|
||||
onBlur?: () => any;
|
||||
onFocus?: () => any;
|
||||
onBlur?: (value: SelectValue) => void;
|
||||
onFocus?: () => void;
|
||||
children?: ValidInputElement |
|
||||
React.ReactElement<OptionProps> |
|
||||
Array<React.ReactElement<OptionProps>>;
|
||||
|
@ -53,28 +53,28 @@ export default function wrapPicker(Picker: React.ComponentClass<any>, defaultFor
|
||||
onOpenChange(open);
|
||||
}
|
||||
|
||||
handleFocus = (e: React.FocusEventHandler<HTMLInputElement>) => {
|
||||
handleFocus: React.FocusEventHandler<HTMLInputElement> = (e) => {
|
||||
const { onFocus } = this.props;
|
||||
if (onFocus) {
|
||||
onFocus(e);
|
||||
}
|
||||
}
|
||||
|
||||
handleBlur = (e: React.FocusEventHandler<HTMLInputElement>) => {
|
||||
handleBlur: React.FocusEventHandler<HTMLInputElement> = (e) => {
|
||||
const { onBlur } = this.props;
|
||||
if (onBlur) {
|
||||
onBlur(e);
|
||||
}
|
||||
}
|
||||
|
||||
handleMouseEnter = (e: React.MouseEventHandler<HTMLInputElement>) => {
|
||||
handleMouseEnter: React.MouseEventHandler<HTMLInputElement> = (e) => {
|
||||
const { onMouseEnter } = this.props;
|
||||
if (onMouseEnter) {
|
||||
onMouseEnter(e);
|
||||
}
|
||||
}
|
||||
|
||||
handleMouseLeave = (e: React.MouseEventHandler<HTMLInputElement>) => {
|
||||
handleMouseLeave: React.MouseEventHandler<HTMLInputElement> = (e) => {
|
||||
const { onMouseLeave } = this.props;
|
||||
if (onMouseLeave) {
|
||||
onMouseLeave(e);
|
||||
|
@ -53,8 +53,8 @@ export interface SelectProps extends AbstractSelectProps {
|
||||
onChange?: (value: SelectValue, option: React.ReactElement<any> | React.ReactElement<any>[]) => void;
|
||||
onSelect?: (value: SelectValue, option: React.ReactElement<any>) => any;
|
||||
onDeselect?: (value: SelectValue) => any;
|
||||
onBlur?: () => any;
|
||||
onFocus?: () => any;
|
||||
onBlur?: (value: SelectValue) => void;
|
||||
onFocus?: () => void;
|
||||
onPopupScroll?: () => any;
|
||||
onInputKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
||||
onMouseEnter?: (e: React.MouseEvent<HTMLInputElement>) => any;
|
||||
|
Loading…
Reference in New Issue
Block a user