This commit is contained in:
Benjy Cui 2017-05-16 12:02:52 +08:00
parent 2feb3d42e6
commit a86a3339fc
2 changed files with 8 additions and 5 deletions

View File

@ -46,19 +46,21 @@ export interface InputProps {
readOnly?: boolean;
addonBefore?: React.ReactNode;
addonAfter?: React.ReactNode;
onKeyDown?: React.FormEventHandler<any>;
onChange?: React.FormEventHandler<any>;
onPressEnter?: React.FormEventHandler<any>;
onClick?: React.FormEventHandler<any>;
onFocus?: React.FormEventHandler<any>;
onBlur?: React.FormEventHandler<any>;
autosize?: boolean | AutoSizeType;
autoComplete?: 'on' | 'off';
style?: React.CSSProperties;
prefix?: React.ReactNode;
suffix?: React.ReactNode;
spellCheck?: boolean;
}
export type HTMLInputProps = React.HTMLProps<HTMLInputElement>;
export default class Input extends Component<InputProps & HTMLInputProps, any> {
export default class Input extends Component<InputProps, any> {
static Group: any;
static Search: any;
static defaultProps = {

View File

@ -1,6 +1,6 @@
import React from 'react';
import classNames from 'classnames';
import Input, { HTMLInputProps } from './Input';
import Input from './Input';
import Icon from '../icon';
export interface SearchProps {
@ -11,12 +11,13 @@ export interface SearchProps {
defaultValue?: any;
value?: any;
onSearch?: (value: string) => any;
onChange?: React.FormEventHandler<any>;
size?: 'large' | 'default' | 'small';
disabled?: boolean;
readOnly?: boolean;
}
export default class Search extends React.Component<SearchProps & HTMLInputProps, any> {
export default class Search extends React.Component<SearchProps, any> {
static defaultProps = {
prefixCls: 'ant-input-search',
onSearch() {},