From fa44de3faadb6d901aeede9b886b3c74aa1c0df8 Mon Sep 17 00:00:00 2001 From: Mitchell Demler Date: Fri, 19 May 2017 15:29:16 +1200 Subject: [PATCH] refactor: rearrange AbstractSelectProps so that AutoCompleteProps has access to some needed SelectProps (#6205) --- components/auto-complete/index.tsx | 1 - components/select/index.tsx | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/auto-complete/index.tsx b/components/auto-complete/index.tsx index 559f456aee..31a1bc00b5 100755 --- a/components/auto-complete/index.tsx +++ b/components/auto-complete/index.tsx @@ -23,7 +23,6 @@ export interface AutoCompleteProps extends AbstractSelectProps { defaultValue?: SelectValue; dataSource: DataSourceItemType[]; optionLabelProp?: string; - filterOption?: boolean | ((inputValue: string, option: Object) => any); onChange?: (value: SelectValue) => void; onSelect?: (value: SelectValue, option: Object) => any; children?: ValidInputElement | diff --git a/components/select/index.tsx b/components/select/index.tsx index 4ade7cb16c..b9b214d0af 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -16,6 +16,11 @@ export interface AbstractSelectProps { disabled?: boolean; style?: React.CSSProperties; placeholder?: string; + dropdownClassName?: string; + dropdownStyle?: React.CSSProperties; + dropdownMenuStyle?: React.CSSProperties; + onSearch?: (value: string) => any; + filterOption?: boolean | ((inputValue: string, option: Object) => any); } export interface LabeledValue { @@ -33,18 +38,14 @@ export interface SelectProps extends AbstractSelectProps { tags?: boolean; combobox?: boolean; optionLabelProp?: string; - filterOption?: boolean | ((inputValue: string, option: Object) => any); onChange?: (value: SelectValue) => void; onSelect?: (value: SelectValue, option: Object) => any; onDeselect?: (value: SelectValue) => any; - onSearch?: (value: string) => any; dropdownMatchSelectWidth?: boolean; optionFilterProp?: string; defaultActiveFirstOption?: boolean; labelInValue?: boolean; getPopupContainer?: (triggerNode: Element) => HTMLElement; - dropdownStyle?: React.CSSProperties; - dropdownMenuStyle?: React.CSSProperties; tokenSeparators?: string[]; getInputElement?: () => React.ReactElement; }