@@ -85,11 +85,10 @@ export default () => (
85
85
| dropdownAlign | additional align applied to dropdown | [ AlignType] ( https://github.com/react-component/trigger/blob/728d7e92394aa4b3214650f743fc47e1382dfa68/src/interface.ts#L25-L80 ) | {} |
86
86
| dropdownMenuStyle | additional style applied to dropdown menu | Object | React.CSSProperties |
87
87
| notFoundContent | specify content to show when no result matches. | ReactNode | 'Not Found' |
88
- | tokenSeparators | separator used to tokenize on tag/multiple mode | string[ ] ? | |
89
88
| open | control select open | boolean | |
90
89
| defaultOpen | control select default open | boolean | |
91
90
| 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 |
93
92
| allowClear | whether allowClear | boolean | { clearIcon?: ReactNode } | false |
94
93
| 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 |
95
94
| tagRender | render custom tags. | (props: CustomTagProps) => ReactNode | - |
@@ -99,16 +98,11 @@ export default () => (
99
98
| combobox | enable combobox mode(can not set multiple at the same time) | boolean | false |
100
99
| multiple | whether multiple select | boolean | false |
101
100
| 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' |
106
101
| defaultValue | initial selected option(s) | String \| String[ ] | - |
107
102
| value | current selected option(s) | String \| String[ ] \| {key: String , label: React .Node} \| {key: String , label: React .Node}[ ] | - |
108
103
| labelInValue | whether to embed label in value, see above value type. Not support ` combobox ` mode | boolean | false |
109
104
| backfill | whether backfill select option to search input (Only works in single and combobox mode) | boolean | false |
110
105
| onChange | called when select an option or input value change(combobox) | function(value, option: Option \| Option[ ] ) | - |
111
- | onSearch | called when input changed | function | - |
112
106
| onBlur | called when blur | function | - |
113
107
| onFocus | called when focus | function | - |
114
108
| onPopupScroll | called when menu is scrolled | function | - |
@@ -120,7 +114,6 @@ export default () => (
120
114
| getInputElement | customize input element | function(): Element | - |
121
115
| showAction | actions trigger the dropdown to show | String[ ] ? | - |
122
116
| autoFocus | focus select after mount | boolean | - |
123
- | autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
124
117
| prefix | specify the select prefix icon or text | ReactNode | - |
125
118
| suffixIcon | specify the select arrow icon | ReactNode | - |
126
119
| clearIcon | specify the clear icon | ReactNode | - |
@@ -141,6 +134,19 @@ export default () => (
141
134
| focus | focus select programmably | - | - |
142
135
| blur | blur select programmably | - | - |
143
136
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
+
144
150
### Option props
145
151
146
152
| name | description | type | default |
0 commit comments