@@ -42,7 +42,23 @@ FluidMultiSelect.propTypes = {
42
42
className : PropTypes . string ,
43
43
44
44
/**
45
- * Specify the direction of the dropdown. Can be either top or bottom.
45
+ * Specify the text that should be read for screen readers that describes total items selected
46
+ */
47
+ clearSelectionDescription : PropTypes . string ,
48
+
49
+ /**
50
+ * Specify the text that should be read for screen readers to clear selection.
51
+ */
52
+ clearSelectionText : PropTypes . string ,
53
+
54
+ /**
55
+ * Provide a compare function that is used to determine the ordering of
56
+ * options. See 'sortItems' for more control.
57
+ */
58
+ compareItems : PropTypes . func ,
59
+
60
+ /**
61
+ * Specify the direction of the multiselect dropdown. Can be either top or bottom.
46
62
*/
47
63
direction : PropTypes . oneOf ( [ 'top' , 'bottom' ] ) ,
48
64
@@ -51,20 +67,21 @@ FluidMultiSelect.propTypes = {
51
67
*/
52
68
disabled : PropTypes . bool ,
53
69
70
+ /**
71
+ * Additional props passed to Downshift
72
+ */
73
+ downshiftProps : PropTypes . object ,
74
+
54
75
/**
55
76
* Specify a custom `id` for the `<input>`
56
77
*/
57
78
id : PropTypes . string . isRequired ,
58
79
59
80
/**
60
- * Allow users to pass in an arbitrary item or a string (in case their items are an array of strings)
61
- * from their collection that are pre-selected
81
+ * Allow users to pass in arbitrary items from their collection that are
82
+ * pre-selected
62
83
*/
63
- initialSelectedItem : PropTypes . oneOfType ( [
64
- PropTypes . object ,
65
- PropTypes . string ,
66
- PropTypes . number ,
67
- ] ) ,
84
+ initialSelectedItems : PropTypes . array ,
68
85
69
86
/**
70
87
* Specify if the currently selected value is invalid.
@@ -111,26 +128,69 @@ FluidMultiSelect.propTypes = {
111
128
*/
112
129
label : PropTypes . node . isRequired ,
113
130
131
+ /**
132
+ * Specify the locale of the control. Used for the default `compareItems`
133
+ * used for sorting the list of items in the control.
134
+ */
135
+ locale : PropTypes . string ,
136
+
114
137
/**
115
138
* `onChange` is a utility for this controlled component to communicate to a
116
139
* consuming component what kind of internal state changes are occurring.
117
140
*/
118
141
onChange : PropTypes . func ,
119
142
120
143
/**
121
- * An optional callback to render the currently selected item as a react element instead of only
122
- * as a string .
144
+ * **Filterable variant only** - `onInputValueChange` is a utility for this controlled component to communicate to
145
+ * the currently typed input .
123
146
*/
124
- renderSelectedItem : PropTypes . func ,
147
+ onInputValueChange : PropTypes . func ,
125
148
126
149
/**
127
- * In the case you want to control the dropdown selection entirely.
150
+ * `onMenuChange` is a utility for this controlled component to communicate to a
151
+ * consuming component that the menu was open(`true`)/closed(`false`).
128
152
*/
129
- selectedItem : PropTypes . oneOfType ( [
130
- PropTypes . object ,
131
- PropTypes . string ,
132
- PropTypes . number ,
133
- ] ) ,
153
+ onMenuChange : PropTypes . func ,
154
+
155
+ /**
156
+ * Whether or not the Multiselect is readonly
157
+ */
158
+ readOnly : PropTypes . bool ,
159
+
160
+ /**
161
+ * For full control of the selected items
162
+ */
163
+ selectedItems : PropTypes . array ,
164
+
165
+ /**
166
+ * Specify feedback (mode) of the selection.
167
+ * `top`: selected item jumps to top
168
+ * `fixed`: selected item stays at it's position
169
+ * `top-after-reopen`: selected item jump to top after reopen dropdown
170
+ */
171
+ selectionFeedback : PropTypes . oneOf ( [ 'top' , 'fixed' , 'top-after-reopen' ] ) ,
172
+
173
+ /**
174
+ * Provide a method that sorts all options in the control. Overriding this
175
+ * prop means that you also have to handle the sort logic for selected versus
176
+ * un-selected items. If you just want to control ordering, consider the
177
+ * `compareItems` prop instead.
178
+ *
179
+ * The return value should be a number whose sign indicates the relative order
180
+ * of the two elements: negative if a is less than b, positive if a is greater
181
+ * than b, and zero if they are equal.
182
+ *
183
+ * sortItems :
184
+ * (items: Array<Item>, {
185
+ * selectedItems: Array<Item>,
186
+ * itemToString: Item => string,
187
+ * compareItems: (itemA: string, itemB: string, {
188
+ * locale: string
189
+ * }) => number,
190
+ * locale: string,
191
+ * }) => Array<Item>
192
+ */
193
+ sortItems : PropTypes . func ,
134
194
135
195
/**
136
196
* Provide the title text that will be read by a screen reader when
@@ -143,6 +203,11 @@ FluidMultiSelect.propTypes = {
143
203
*/
144
204
translateWithId : PropTypes . func ,
145
205
206
+ /**
207
+ * Specify title to show title on hover
208
+ */
209
+ useTitleInItem : PropTypes . bool ,
210
+
146
211
/**
147
212
* Specify whether the control is currently in warning state
148
213
*/
0 commit comments