@@ -76,34 +76,34 @@ export default () => (
76
76
| animation | dropdown animation name. only support slide-up now | String | '' |
77
77
| transitionName | dropdown css animation name | String | '' |
78
78
| choiceTransitionName | css animation name for selected items at multiple mode | String | '' |
79
- | dropdownMatchSelectWidth | whether dropdown's width is same with select | bool | true |
79
+ | dropdownMatchSelectWidth | whether dropdown's width is same with select | boolean | true |
80
80
| dropdownClassName | additional className applied to dropdown | String | - |
81
81
| dropdownStyle | additional style applied to dropdown | React.CSSProperties | {} |
82
82
| dropdownAlign | additional align applied to dropdown | [ AlignType] ( https://github.com/react-component/trigger/blob/728d7e92394aa4b3214650f743fc47e1382dfa68/src/interface.ts#L25-L80 ) | {} |
83
83
| dropdownMenuStyle | additional style applied to dropdown menu | Object | React.CSSProperties |
84
84
| notFoundContent | specify content to show when no result matches. | ReactNode | 'Not Found' |
85
85
| tokenSeparators | separator used to tokenize on tag/multiple mode | string[ ] ? | |
86
- | open | control select open | bool | |
87
- | defaultOpen | control select default open | bool | |
86
+ | open | control select open | boolean | |
87
+ | defaultOpen | control select default open | boolean | |
88
88
| placeholder | select placeholder | React Node | |
89
- | showSearch | whether show search input in single mode | bool | true |
90
- | allowClear | whether allowClear | bool | false |
91
- | 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. | bool | false |
89
+ | showSearch | whether show search input in single mode | boolean | true |
90
+ | allowClear | whether allowClear | boolean | { clearIcon?: ReactNode } | false |
91
+ | 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 |
92
92
| tagRender | render custom tags. | (props: CustomTagProps) => ReactNode | - |
93
93
| maxTagTextLength | max tag text length to show | number | - |
94
94
| maxTagCount | max tag count to show | number | - |
95
95
| maxTagPlaceholder | placeholder for omitted values | ReactNode/function(omittedValues) | - |
96
- | combobox | enable combobox mode(can not set multiple at the same time) | bool | false |
97
- | multiple | whether multiple select | bool | false |
98
- | disabled | whether disabled select | bool | false |
99
- | filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | bool | true/Function(inputValue: string , option: Option ) |
96
+ | combobox | enable combobox mode(can not set multiple at the same time) | boolean | false |
97
+ | multiple | whether multiple select | boolean | false |
98
+ | disabled | whether disabled select | boolean | false |
99
+ | filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | boolean | true/Function(inputValue: string , option: Option ) |
100
100
| optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |
101
101
| 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) | - |
102
102
| optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |
103
103
| defaultValue | initial selected option(s) | String \| String[ ] | - |
104
104
| value | current selected option(s) | String \| String[ ] \| {key: String , label: React .Node} \| {key: String , label: React .Node}[ ] | - |
105
- | labelInValue | whether to embed label in value, see above value type. Not support ` combobox ` mode | Bool | false |
106
- | backfill | whether backfill select option to search input (Only works in single and combobox mode) | Bool | false |
105
+ | labelInValue | whether to embed label in value, see above value type. Not support ` combobox ` mode | boolean | false |
106
+ | backfill | whether backfill select option to search input (Only works in single and combobox mode) | boolean | false |
107
107
| onChange | called when select an option or input value change(combobox) | function(value, option: Option \| Option[ ] ) | - |
108
108
| onSearch | called when input changed | function | - |
109
109
| onBlur | called when blur | function | - |
@@ -112,19 +112,19 @@ export default () => (
112
112
| onSelect | called when a option is selected. param is option's value and option instance | Function(value, option: Option ) | - |
113
113
| onDeselect | called when a option is deselected. param is option's value. only called for multiple or tags | Function(value, option: Option ) | - |
114
114
| onInputKeyDown | called when key down on input | Function(event) | - |
115
- | defaultActiveFirstOption | whether active first option by default | bool | true |
115
+ | defaultActiveFirstOption | whether active first option by default | boolean | true |
116
116
| getPopupContainer | container which popup select menu rendered into | function(trigger: Node ): Node | function(){return document.body;} |
117
117
| getInputElement | customize input element | function(): Element | - |
118
118
| showAction | actions trigger the dropdown to show | String[ ] ? | - |
119
- | autoFocus | focus select after mount | Bool | - |
119
+ | autoFocus | focus select after mount | boolean | - |
120
120
| autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
121
121
| suffixIcon | specify the select arrow icon | ReactNode | - |
122
122
| clearIcon | specify the clear icon | ReactNode | - |
123
123
| removeIcon | specify the remove icon | ReactNode | - |
124
124
| menuItemSelectedIcon | specify the item selected icon | ReactNode \| (props: MenuItemProps) => ReactNode | - |
125
125
| dropdownRender | render custom dropdown menu | (menu: React.Node, props: MenuProps) => ReactNode | - |
126
- | loading | show loading icon in arrow | Boolean | false |
127
- | virtual | Disable virtual scroll | Boolean | true |
126
+ | loading | show loading icon in arrow | boolean | false |
127
+ | virtual | Disable virtual scroll | boolean | true |
128
128
| direction | direction of dropdown | 'ltr' \| 'rtl' | 'ltr' |
129
129
130
130
### Methods
@@ -139,7 +139,7 @@ export default () => (
139
139
| name | description | type | default |
140
140
| --- | --- | --- | --- |
141
141
| className | additional class to option | String | '' |
142
- | disabled | no effect for click or keydown for this item | bool | false |
142
+ | disabled | no effect for click or keydown for this item | boolean | false |
143
143
| key | if react want you to set key, then key is same as value, you can omit value | String/number | - |
144
144
| value | default filter by this attribute. if react want you to set key, then key is same as value, you can omit value | String/number | - |
145
145
| title | if you are not satisfied with auto-generated ` title ` which is show while hovering on selected value, you can customize it with this property | String | - |
0 commit comments