From a86a3339fc2b41926f1ff520c0a7be751db0f7d3 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Tue, 16 May 2017 12:02:52 +0800 Subject: [PATCH] revert: #5990 --- components/input/Input.tsx | 8 +++++--- components/input/Search.tsx | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/input/Input.tsx b/components/input/Input.tsx index 23cd6cbc77..6faa4b9730 100644 --- a/components/input/Input.tsx +++ b/components/input/Input.tsx @@ -46,19 +46,21 @@ export interface InputProps { readOnly?: boolean; addonBefore?: React.ReactNode; addonAfter?: React.ReactNode; + onKeyDown?: React.FormEventHandler; + onChange?: React.FormEventHandler; onPressEnter?: React.FormEventHandler; onClick?: React.FormEventHandler; onFocus?: React.FormEventHandler; onBlur?: React.FormEventHandler; autosize?: boolean | AutoSizeType; + autoComplete?: 'on' | 'off'; style?: React.CSSProperties; prefix?: React.ReactNode; suffix?: React.ReactNode; + spellCheck?: boolean; } -export type HTMLInputProps = React.HTMLProps; - -export default class Input extends Component { +export default class Input extends Component { static Group: any; static Search: any; static defaultProps = { diff --git a/components/input/Search.tsx b/components/input/Search.tsx index 2f3a5dec90..527dd045fe 100644 --- a/components/input/Search.tsx +++ b/components/input/Search.tsx @@ -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; size?: 'large' | 'default' | 'small'; disabled?: boolean; readOnly?: boolean; } -export default class Search extends React.Component { +export default class Search extends React.Component { static defaultProps = { prefixCls: 'ant-input-search', onSearch() {},