@@ -85,11 +85,10 @@ export default () => (
8585| dropdownAlign | additional align applied to dropdown | [ AlignType] ( https://github.com/react-component/trigger/blob/728d7e92394aa4b3214650f743fc47e1382dfa68/src/interface.ts#L25-L80 ) | {} |
8686| dropdownMenuStyle | additional style applied to dropdown menu | Object | React.CSSProperties |
8787| notFoundContent | specify content to show when no result matches. | ReactNode | 'Not Found' |
88- | tokenSeparators | separator used to tokenize on tag/multiple mode | string[ ] ? | |
8988| open | control select open | boolean | |
9089| defaultOpen | control select default open | boolean | |
9190| placeholder | select placeholder | React Node | |
92- | showSearch | whether show search input in single mode | boolean | true |
91+ | showSearch | whether show search input in single mode | boolean \| Object | true |
9392| allowClear | whether allowClear | boolean | { clearIcon?: ReactNode } | false |
9493| tags | when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far. | boolean | false |
9594| tagRender | render custom tags. | (props: CustomTagProps) => ReactNode | - |
@@ -99,16 +98,11 @@ export default () => (
9998| combobox | enable combobox mode(can not set multiple at the same time) | boolean | false |
10099| multiple | whether multiple select | boolean | false |
101100| disabled | whether disabled select | boolean | false |
102- | filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | boolean | true/Function(inputValue: string , option: Option ) |
103- | optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |
104- | filterSort | Sort function for search options sorting, see [ Array.sort] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort ) 's compareFunction. | Function(optionA: Option , optionB: Option) | - |
105- | optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |
106101| defaultValue | initial selected option(s) | String \| String[ ] | - |
107102| value | current selected option(s) | String \| String[ ] \| {key: String , label: React .Node} \| {key: String , label: React .Node}[ ] | - |
108103| labelInValue | whether to embed label in value, see above value type. Not support ` combobox ` mode | boolean | false |
109104| backfill | whether backfill select option to search input (Only works in single and combobox mode) | boolean | false |
110105| onChange | called when select an option or input value change(combobox) | function(value, option: Option \| Option[ ] ) | - |
111- | onSearch | called when input changed | function | - |
112106| onBlur | called when blur | function | - |
113107| onFocus | called when focus | function | - |
114108| onPopupScroll | called when menu is scrolled | function | - |
@@ -120,7 +114,6 @@ export default () => (
120114| getInputElement | customize input element | function(): Element | - |
121115| showAction | actions trigger the dropdown to show | String[ ] ? | - |
122116| autoFocus | focus select after mount | boolean | - |
123- | autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
124117| prefix | specify the select prefix icon or text | ReactNode | - |
125118| suffixIcon | specify the select arrow icon | ReactNode | - |
126119| clearIcon | specify the clear icon | ReactNode | - |
@@ -141,6 +134,19 @@ export default () => (
141134| focus | focus select programmably | - | - |
142135| blur | blur select programmably | - | - |
143136
137+ ### showSearch
138+
139+ | name | description | type | default |
140+ | --- | --- | --- | --- |
141+ | autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
142+ | filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | boolean | true/Function(inputValue: string , option: Option ) |
143+ | filterSort | Sort function for search options sorting, see [ Array.sort] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort ) 's compareFunction. | Function(optionA: Option , optionB: Option) | - |
144+ | optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |
145+ | optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |
146+ | searchValue | The current input "search" text | string | - |
147+ | tokenSeparators | separator used to tokenize on tag/multiple mode | string[ ] ? | |
148+ | onSearch | called when input changed | function | - |
149+
144150### Option props
145151
146152| name | description | type | default |
0 commit comments