@iress-oss/ids-mcp-server 5.15.0 → 5.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/generated/docs/components_components-alert-docs.md +496 -0
  2. package/generated/docs/components_components-autocomplete-docs.md +3429 -0
  3. package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +39 -14
  4. package/generated/docs/{components-badge-docs.md → components_components-badge-docs.md} +222 -30
  5. package/generated/docs/components_components-button-docs.md +2078 -0
  6. package/generated/docs/components_components-button-recipes-docs.md +37 -0
  7. package/generated/docs/components_components-buttongroup-docs.md +1045 -0
  8. package/generated/docs/components_components-card-docs.md +2290 -0
  9. package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +132 -15
  10. package/generated/docs/components_components-checkbox-docs.md +1040 -0
  11. package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1001 -82
  12. package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +102 -12
  13. package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
  14. package/generated/docs/components_components-combobox-docs.md +3735 -0
  15. package/generated/docs/{components-container-docs.md → components_components-container-docs.md} +61 -24
  16. package/generated/docs/{components-divider-docs.md → components_components-divider-docs.md} +83 -24
  17. package/generated/docs/{components-expander-docs.md → components_components-expander-docs.md} +266 -33
  18. package/generated/docs/components_components-field-docs.md +1369 -0
  19. package/generated/docs/components_components-filter-docs.md +4080 -0
  20. package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1556 -360
  21. package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +277 -60
  22. package/generated/docs/{components-hide-docs.md → components_components-hide-docs.md} +195 -124
  23. package/generated/docs/components_components-icon-docs.md +1337 -0
  24. package/generated/docs/{components-inline-docs.md → components_components-inline-docs.md} +462 -42
  25. package/generated/docs/components_components-input-docs.md +1468 -0
  26. package/generated/docs/components_components-input-recipes-docs.md +367 -0
  27. package/generated/docs/components_components-inputcurrency-docs.md +432 -0
  28. package/generated/docs/{components-inputcurrency-recipes-docs.md → components_components-inputcurrency-recipes-docs.md} +113 -17
  29. package/generated/docs/components_components-label-docs.md +323 -0
  30. package/generated/docs/components_components-menu-docs.md +2345 -0
  31. package/generated/docs/components_components-menu-menuitem-docs.md +633 -0
  32. package/generated/docs/{components-modal-docs.md → components_components-modal-docs.md} +1640 -231
  33. package/generated/docs/components_components-navbar-docs.md +1847 -0
  34. package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +721 -40
  35. package/generated/docs/{components-panel-docs.md → components_components-panel-docs.md} +754 -57
  36. package/generated/docs/components_components-placeholder-docs.md +92 -0
  37. package/generated/docs/components_components-popover-docs.md +1643 -0
  38. package/generated/docs/components_components-popover-recipes-docs.md +491 -0
  39. package/generated/docs/components_components-progress-docs.md +115 -0
  40. package/generated/docs/{components-provider-docs.md → components_components-provider-docs.md} +42 -33
  41. package/generated/docs/components_components-radio-docs.md +491 -0
  42. package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +927 -75
  43. package/generated/docs/components_components-readonly-docs.md +263 -0
  44. package/generated/docs/components_components-richselect-docs.md +6521 -0
  45. package/generated/docs/{components-row-docs.md → components_components-row-docs.md} +353 -43
  46. package/generated/docs/{components-select-docs.md → components_components-select-docs.md} +719 -61
  47. package/generated/docs/components_components-skeleton-docs.md +480 -0
  48. package/generated/docs/{components-skeleton-recipes-docs.md → components_components-skeleton-recipes-docs.md} +51 -11
  49. package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
  50. package/generated/docs/components_components-slideout-docs.md +2293 -0
  51. package/generated/docs/components_components-slider-docs.md +1276 -0
  52. package/generated/docs/components_components-spinner-docs.md +82 -0
  53. package/generated/docs/{components-stack-docs.md → components_components-stack-docs.md} +223 -40
  54. package/generated/docs/components_components-table-docs.md +3658 -0
  55. package/generated/docs/components_components-tabset-docs.md +772 -0
  56. package/generated/docs/components_components-tabset-tab-docs.md +262 -0
  57. package/generated/docs/components_components-tag-docs.md +257 -0
  58. package/generated/docs/{components-text-docs.md → components_components-text-docs.md} +491 -51
  59. package/generated/docs/{components-toaster-docs.md → components_components-toaster-docs.md} +187 -85
  60. package/generated/docs/components_components-toaster-toast-docs.md +634 -0
  61. package/generated/docs/components_components-toggle-docs.md +461 -0
  62. package/generated/docs/{components-tooltip-docs.md → components_components-tooltip-docs.md} +286 -41
  63. package/generated/docs/{components-validationmessage-docs.md → components_components-validationmessage-docs.md} +230 -61
  64. package/generated/docs/components_contact-us-docs.md +12 -0
  65. package/generated/docs/{foundations-accessibility-docs.md → components_foundations-accessibility-docs.md} +11 -21
  66. package/generated/docs/{foundations-colours-docs.md → components_foundations-colour-030-colours.md} +8 -15
  67. package/generated/docs/{foundations-consistency-docs.md → components_foundations-consistency-docs.md} +12 -20
  68. package/generated/docs/{foundations-content-docs.md → components_foundations-content-docs.md} +6 -11
  69. package/generated/docs/components_foundations-introduction-docs.md +15 -0
  70. package/generated/docs/{foundations-principles-docs.md → components_foundations-principles-docs.md} +14 -24
  71. package/generated/docs/components_foundations-typography-docs.md +608 -0
  72. package/generated/docs/{foundations-user-experience-docs.md → components_foundations-user-experience-docs.md} +16 -26
  73. package/generated/docs/{foundations-visual-design-docs.md → components_foundations-visual-design-docs.md} +10 -17
  74. package/generated/docs/{frequently-asked-questions-docs.md → components_frequently-asked-questions-docs.md} +14 -23
  75. package/generated/docs/components_get-started-develop-docs.md +84 -0
  76. package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
  77. package/generated/docs/components_introduction-docs.md +15 -0
  78. package/generated/docs/{patterns-loading-docs.md → components_patterns-loading-docs.md} +798 -153
  79. package/generated/docs/components_resources-changelog-docs.md +4 -0
  80. package/generated/docs/{resources-code-katas-docs.md → components_resources-code-katas-docs.md} +5 -9
  81. package/generated/docs/{resources-migration-guides-from-v4-to-v5-docs.md → components_resources-migration-guides-from-v4-to-v5-docs.md} +54 -239
  82. package/generated/docs/components_sandbox-docs.md +4 -0
  83. package/generated/docs/{versions-docs.md → components_versions-docs.md} +5 -8
  84. package/generated/docs/guidelines.md +484 -200
  85. package/generated/docs/introduction-docs.md +19 -30
  86. package/package.json +41 -45
  87. package/generated/docs/components-alert-docs.md +0 -130
  88. package/generated/docs/components-autocomplete-docs.md +0 -754
  89. package/generated/docs/components-button-docs.md +0 -362
  90. package/generated/docs/components-button-recipes-docs.md +0 -76
  91. package/generated/docs/components-buttongroup-docs.md +0 -310
  92. package/generated/docs/components-card-docs.md +0 -494
  93. package/generated/docs/components-checkbox-docs.md +0 -193
  94. package/generated/docs/components-combobox-docs.md +0 -1016
  95. package/generated/docs/components-field-docs.md +0 -675
  96. package/generated/docs/components-filter-docs.md +0 -1109
  97. package/generated/docs/components-icon-docs.md +0 -553
  98. package/generated/docs/components-input-docs.md +0 -335
  99. package/generated/docs/components-input-recipes-docs.md +0 -140
  100. package/generated/docs/components-inputcurrency-docs.md +0 -157
  101. package/generated/docs/components-label-docs.md +0 -135
  102. package/generated/docs/components-menu-docs.md +0 -704
  103. package/generated/docs/components-menu-menuitem-docs.md +0 -193
  104. package/generated/docs/components-navbar-docs.md +0 -291
  105. package/generated/docs/components-placeholder-docs.md +0 -27
  106. package/generated/docs/components-popover-docs.md +0 -464
  107. package/generated/docs/components-popover-recipes-docs.md +0 -245
  108. package/generated/docs/components-progress-docs.md +0 -104
  109. package/generated/docs/components-radio-docs.md +0 -107
  110. package/generated/docs/components-readonly-docs.md +0 -89
  111. package/generated/docs/components-richselect-docs.md +0 -2433
  112. package/generated/docs/components-skeleton-docs.md +0 -214
  113. package/generated/docs/components-slideout-docs.md +0 -538
  114. package/generated/docs/components-slider-docs.md +0 -346
  115. package/generated/docs/components-spinner-docs.md +0 -59
  116. package/generated/docs/components-table-ag-grid-docs.md +0 -1074
  117. package/generated/docs/components-table-docs.md +0 -1305
  118. package/generated/docs/components-tabset-docs.md +0 -341
  119. package/generated/docs/components-tabset-tab-docs.md +0 -86
  120. package/generated/docs/components-tag-docs.md +0 -115
  121. package/generated/docs/components-toaster-toast-docs.md +0 -157
  122. package/generated/docs/components-toggle-docs.md +0 -158
  123. package/generated/docs/contact-us-docs.md +0 -27
  124. package/generated/docs/extensions-editor-docs.md +0 -288
  125. package/generated/docs/extensions-editor-recipes-docs.md +0 -39
  126. package/generated/docs/foundations-introduction-docs.md +0 -17
  127. package/generated/docs/foundations-typography-docs.md +0 -191
  128. package/generated/docs/get-started-develop-docs.md +0 -209
  129. package/generated/docs/get-started-using-storybook-docs.md +0 -68
  130. package/generated/docs/resources-changelog-docs.md +0 -6
  131. package/generated/docs/themes-available-themes-docs.md +0 -66
  132. package/generated/docs/themes-introduction-docs.md +0 -121
  133. package/generated/docs/themes-tokens-docs.md +0 -1200
  134. /package/{LICENSE.txt → LICENSE} +0 -0
@@ -0,0 +1,4080 @@
1
+ Filter
2
+ ======
3
+
4
+ Overview
5
+ --------
6
+
7
+ A filter allows you to pick one or more options from a list (that may be searchable) and is triggered by an activator button.
8
+
9
+ [](./iframe.html?id=components-filter--default)
10
+
11
+ Filter
12
+
13
+ None selected
14
+
15
+ Hide codedrawOpen in CodeSandbox
16
+
17
+ <IressFilter
18
+ label\="Filter"
19
+ options\={\[
20
+ {
21
+ label: 'Option 1',
22
+ value: 1
23
+ },
24
+ {
25
+ label: 'Option 2',
26
+ value: 2
27
+ },
28
+ {
29
+ label: 'Option 3',
30
+ value: 3
31
+ },
32
+ {
33
+ label: 'Option 4',
34
+ value: 4
35
+ },
36
+ {
37
+ label: 'Option 5',
38
+ value: 5
39
+ }
40
+ \]}
41
+ popoverProps\={{
42
+ container: {}
43
+ }}
44
+ />
45
+
46
+ ```
47
+
48
+ Props
49
+ -----
50
+
51
+ | Name | Description | Default | Control |
52
+ | --- | --- | --- | --- |
53
+ | defaultValue |
54
+ Value of selected option for uncontrolled filter.
55
+
56
+ union
57
+
58
+
59
+
60
+ | \- | Set object |
61
+ | inputProps |
62
+
63
+ Customise the searchable `IressInput` props for your needs.
64
+
65
+ Pick
66
+
67
+
68
+
69
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
70
+ | label\* |
71
+
72
+ Label to display in the activator button.
73
+
74
+ ReactNode
75
+
76
+
77
+
78
+ | \- |
79
+
80
+ "Filter"
81
+
82
+ |
83
+ | limitDesktop |
84
+
85
+ |
86
+
87
+ 12
88
+
89
+ | Set object |
90
+ | limitMobile |
91
+
92
+ |
93
+
94
+ 6
95
+
96
+ | Set object |
97
+ | multiSelect |
98
+
99
+ Multi-select mode. When `true`, multiple options can be selected.
100
+
101
+ boolean
102
+
103
+
104
+
105
+ | \- | Set boolean |
106
+ | onChange |
107
+
108
+ Emitted when the value changes.
109
+
110
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
111
+
112
+ | \- | \- |
113
+ | onReset |
114
+
115
+ Emitted when the value is reset.
116
+
117
+ () => void
118
+
119
+ | \- | \- |
120
+ | options |
121
+
122
+ array
123
+
124
+
125
+
126
+ | \- |
127
+
128
+ Edit JSON
129
+
130
+ * options :
131
+
132
+ \[
133
+
134
+ * 0 :
135
+
136
+ {...} 2 keys
137
+
138
+ * 1 :
139
+
140
+ {...} 2 keys
141
+
142
+ * 2 :
143
+
144
+ {...} 2 keys
145
+
146
+ * 3 :
147
+
148
+ {...} 2 keys
149
+
150
+ * 4 :
151
+
152
+ {...} 2 keys
153
+
154
+
155
+ \]
156
+
157
+
158
+
159
+
160
+ |
161
+ | popoverProps |
162
+
163
+ Customise the IressPopover props for your needs.
164
+
165
+ FilterPopoverProps
166
+
167
+
168
+
169
+ | { align: 'bottom-start' } |
170
+
171
+ Edit JSON
172
+
173
+ popoverProps :
174
+
175
+ {
176
+
177
+ }
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ |
186
+ | searchable |
187
+
188
+ When `true` a search field is shown to search for specific filter option(s).
189
+
190
+ boolean
191
+
192
+
193
+
194
+ | \- | Set boolean |
195
+ | searchNoResultsText |
196
+
197
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
198
+
199
+ ReactNode
200
+
201
+
202
+
203
+ | \- | Set object |
204
+ | selectedOptionsText |
205
+
206
+ Text displayed next to label when two or more options are selected.
207
+
208
+ string
209
+
210
+
211
+
212
+ | \- | Set string |
213
+ | value |
214
+
215
+ Value of selected option for controlled filter.
216
+
217
+ union
218
+
219
+
220
+
221
+ | \- | Set object |
222
+ | visibleResetButton |
223
+
224
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
225
+
226
+ union
227
+
228
+
229
+
230
+ | \- | Set object |
231
+
232
+ Usage
233
+ -----
234
+
235
+ The `IressFilter` component has been built to be flexible enough to cover most application needs, allowing a user to add or remove data items from a displayed data set.
236
+
237
+ This component is not designed to be used within forms and should be used to provide instant updates to rendered data. Instead, in forms, you should use components like `IressSelect`, `IressCombobox` and `IressCheckboxGroup`.
238
+
239
+ Here is an example using multiple `IressFilter`s to filter an `IressTable`.
240
+
241
+ [](./iframe.html?id=components-filter--search-table)
242
+
243
+ Name
244
+
245
+ None selected
246
+
247
+ Status
248
+
249
+ None selected
250
+
251
+ Location
252
+
253
+ None selected
254
+
255
+ Gender
256
+
257
+ None selected
258
+
259
+ Reset filters
260
+
261
+ * * *
262
+
263
+ System users
264
+ | User | Name | Status | Location | Gender |
265
+ | --- | --- | --- | --- | --- |
266
+ | farmboy | Luke Skywalker | Inactive | Temple Island | male |
267
+ | nevertellmetheodds | Han Solo | Inactive | unknown | male |
268
+ | goldenrod | C-3PO | Active | Space | n/a |
269
+ | whistles | R2-D2 | Active | Space | n/a |
270
+ | princess | Leia Organa | Inactive | unknown | female |
271
+
272
+ Hide codedrawOpen in CodeSandbox
273
+
274
+ import {
275
+ IressInline,
276
+ IressStack,
277
+ IressTable,
278
+ type LabelValueMeta,
279
+ IressFilter,
280
+ type IressFilterProps,
281
+ IressButton,
282
+ IressDivider,
283
+ } from '@/main';
284
+ import { useMemo, useState } from 'react';
285
+ import { searchStarWarsCharacters } from '@/mocks/starWars';
286
+ const toArray \= <T,\>(item?: T | T\[\]): T\[\] \=> {
287
+ if (Array.isArray(item)) {
288
+ return item;
289
+ }
290
+ return item !== undefined ? \[item\] : \[\];
291
+ };
292
+ const USERS \= \[
293
+ {
294
+ user: 'farmboy',
295
+ name: 'Luke Skywalker',
296
+ location: 'Temple Island',
297
+ gender: 'male',
298
+ status: 'Inactive',
299
+ },
300
+ {
301
+ user: 'nevertellmetheodds',
302
+ name: 'Han Solo',
303
+ location: 'unknown',
304
+ gender: 'male',
305
+ status: 'Inactive',
306
+ },
307
+ {
308
+ user: 'goldenrod',
309
+ name: 'C-3PO',
310
+ location: 'Space',
311
+ gender: 'n/a',
312
+ status: 'Active',
313
+ },
314
+ {
315
+ user: 'whistles',
316
+ name: 'R2-D2',
317
+ location: 'Space',
318
+ gender: 'n/a',
319
+ status: 'Active',
320
+ },
321
+ {
322
+ user: 'princess',
323
+ name: 'Leia Organa',
324
+ location: 'unknown',
325
+ gender: 'female',
326
+ status: 'Inactive',
327
+ },
328
+ \];
329
+ const getUniqueValues \= (key: string): LabelValueMeta\[\] \=> {
330
+ const unique: string\[\] \= \[\];
331
+ USERS.forEach((user) \=> {
332
+ const propVal \= user\[key as never\];
333
+ if (!unique.includes(propVal)) unique.push(propVal);
334
+ });
335
+ return unique.map((item: string) \=> ({
336
+ label: item,
337
+ value: item,
338
+ }));
339
+ };
340
+ export const FilterSearchTable \= () \=> {
341
+ const \[name, setName\] \= useState<LabelValueMeta\[\]\>(\[\]);
342
+ const \[status, setStatus\] \= useState<LabelValueMeta\[\]\>(\[\]);
343
+ const \[location, setLocation\] \= useState<LabelValueMeta\[\]\>(\[\]);
344
+ const \[gender, setGender\] \= useState<LabelValueMeta\[\]\>(\[\]);
345
+ const columns \= \[
346
+ { key: 'user', label: 'User' },
347
+ { key: 'name', label: 'Name' },
348
+ { key: 'status', label: 'Status' },
349
+ { key: 'location', label: 'Location' },
350
+ { key: 'gender', label: 'Gender' },
351
+ \];
352
+ const rows \= useMemo(() \=> {
353
+ const match \= (filter: LabelValueMeta\[\], detail: string): boolean \=>
354
+ filter.length \=== 0 ||
355
+ filter.some(
356
+ (filterItem) \=> (filterItem.value ?? filterItem.label) \=== detail,
357
+ );
358
+ return USERS.filter(
359
+ (user) \=>
360
+ match(name, user.name) &&
361
+ match(status, user.status) &&
362
+ match(location, user.location) &&
363
+ match(gender, user.gender),
364
+ );
365
+ }, \[name, status, location, gender\]);
366
+ const handleReset \= () \=> {
367
+ setName(\[\]);
368
+ setStatus(\[\]);
369
+ setLocation(\[\]);
370
+ setGender(\[\]);
371
+ };
372
+ return (
373
+ <IressStack gutter\={IressStack.Gutter.Md}\>
374
+ <IressInline gutter\={IressInline.Gutter.Md}\>
375
+ <IressFilter
376
+ {...{
377
+ label: 'Filter',
378
+ options: \[
379
+ {
380
+ label: 'Option 1',
381
+ value: 1,
382
+ },
383
+ {
384
+ label: 'Option 2',
385
+ value: 2,
386
+ },
387
+ {
388
+ label: 'Option 3',
389
+ value: 3,
390
+ },
391
+ {
392
+ label: 'Option 4',
393
+ value: 4,
394
+ },
395
+ {
396
+ label: 'Option 5',
397
+ value: 5,
398
+ },
399
+ \],
400
+ popoverProps: {
401
+ container: {},
402
+ },
403
+ visibleResetButton: true,
404
+ }}
405
+ label\="Name"
406
+ options\={searchStarWarsCharacters}
407
+ value\={name}
408
+ onChange\={(value) \=> setName(toArray(value))}
409
+ onReset\={() \=> setName(\[\])}
410
+ />
411
+ <IressFilter
412
+ {...{
413
+ label: 'Filter',
414
+ options: \[
415
+ {
416
+ label: 'Option 1',
417
+ value: 1,
418
+ },
419
+ {
420
+ label: 'Option 2',
421
+ value: 2,
422
+ },
423
+ {
424
+ label: 'Option 3',
425
+ value: 3,
426
+ },
427
+ {
428
+ label: 'Option 4',
429
+ value: 4,
430
+ },
431
+ {
432
+ label: 'Option 5',
433
+ value: 5,
434
+ },
435
+ \],
436
+ popoverProps: {
437
+ container: {},
438
+ },
439
+ visibleResetButton: true,
440
+ }}
441
+ label\="Status"
442
+ options\={getUniqueValues('status')}
443
+ value\={status}
444
+ onChange\={(value) \=> setStatus(toArray(value))}
445
+ onReset\={() \=> setStatus(\[\])}
446
+ />
447
+ <IressFilter
448
+ {...{
449
+ label: 'Filter',
450
+ options: \[
451
+ {
452
+ label: 'Option 1',
453
+ value: 1,
454
+ },
455
+ {
456
+ label: 'Option 2',
457
+ value: 2,
458
+ },
459
+ {
460
+ label: 'Option 3',
461
+ value: 3,
462
+ },
463
+ {
464
+ label: 'Option 4',
465
+ value: 4,
466
+ },
467
+ {
468
+ label: 'Option 5',
469
+ value: 5,
470
+ },
471
+ \],
472
+ popoverProps: {
473
+ container: {},
474
+ },
475
+ visibleResetButton: true,
476
+ }}
477
+ label\="Location"
478
+ options\={getUniqueValues('location')}
479
+ value\={location}
480
+ onChange\={(value) \=> setLocation(toArray(value))}
481
+ onReset\={() \=> setLocation(\[\])}
482
+ />
483
+ <IressFilter
484
+ {...{
485
+ label: 'Filter',
486
+ options: \[
487
+ {
488
+ label: 'Option 1',
489
+ value: 1,
490
+ },
491
+ {
492
+ label: 'Option 2',
493
+ value: 2,
494
+ },
495
+ {
496
+ label: 'Option 3',
497
+ value: 3,
498
+ },
499
+ {
500
+ label: 'Option 4',
501
+ value: 4,
502
+ },
503
+ {
504
+ label: 'Option 5',
505
+ value: 5,
506
+ },
507
+ \],
508
+ popoverProps: {
509
+ container: {},
510
+ },
511
+ visibleResetButton: true,
512
+ }}
513
+ label\="Gender"
514
+ options\={getUniqueValues('gender')}
515
+ value\={gender}
516
+ onChange\={(value) \=> setGender(toArray(value))}
517
+ onReset\={() \=> setGender(\[\])}
518
+ />
519
+ <IressButton onClick\={handleReset} mode\={IressButton.Mode.Tertiary}\>
520
+ Reset filters </IressButton\>
521
+ </IressInline\>
522
+ <IressDivider />
523
+ <IressTable
524
+ caption\="System users"
525
+ columns\={columns}
526
+ rows\={rows}
527
+ empty\={'No results found'}
528
+ />
529
+ </IressStack\>
530
+ );
531
+ };
532
+
533
+ ```
534
+
535
+ #### Props
536
+
537
+ | Name | Description | Default | Control |
538
+ | --- | --- | --- | --- |
539
+ | defaultValue |
540
+ Value of selected option for uncontrolled filter.
541
+
542
+ union
543
+
544
+
545
+
546
+ | \- | Set object |
547
+ | inputProps |
548
+
549
+ Customise the searchable `IressInput` props for your needs.
550
+
551
+ Pick
552
+
553
+
554
+
555
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
556
+ | label\* |
557
+
558
+ Label to display in the activator button.
559
+
560
+ ReactNode
561
+
562
+
563
+
564
+ | \- | \- |
565
+ | limitDesktop |
566
+
567
+ |
568
+
569
+ 12
570
+
571
+ | Set object |
572
+ | limitMobile |
573
+
574
+ |
575
+
576
+ 6
577
+
578
+ | Set object |
579
+ | multiSelect |
580
+
581
+ Multi-select mode. When `true`, multiple options can be selected.
582
+
583
+ boolean
584
+
585
+
586
+
587
+ | \- | Set boolean |
588
+ | onChange |
589
+
590
+ Emitted when the value changes.
591
+
592
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
593
+
594
+ | \- | \- |
595
+ | onReset |
596
+
597
+ Emitted when the value is reset.
598
+
599
+ () => void
600
+
601
+ | \- | \- |
602
+ | options |
603
+
604
+ array
605
+
606
+
607
+
608
+ | \- | \- |
609
+ | popoverProps |
610
+
611
+ Customise the IressPopover props for your needs.
612
+
613
+ FilterPopoverProps
614
+
615
+
616
+
617
+ | { align: 'bottom-start' } |
618
+
619
+ Edit JSON
620
+
621
+ popoverProps :
622
+
623
+ {
624
+
625
+ }
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ |
634
+ | searchable |
635
+
636
+ When `true` a search field is shown to search for specific filter option(s).
637
+
638
+ boolean
639
+
640
+
641
+
642
+ | \- | Set boolean |
643
+ | searchNoResultsText |
644
+
645
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
646
+
647
+ ReactNode
648
+
649
+
650
+
651
+ | \- | Set object |
652
+ | selectedOptionsText |
653
+
654
+ Text displayed next to label when two or more options are selected.
655
+
656
+ string
657
+
658
+
659
+
660
+ | \- | Set string |
661
+ | value |
662
+
663
+ Value of selected option for controlled filter.
664
+
665
+ union
666
+
667
+
668
+
669
+ | \- | \- |
670
+ | visibleResetButton |
671
+
672
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
673
+
674
+ union
675
+
676
+
677
+
678
+ | \- |
679
+
680
+ true
681
+
682
+ |
683
+
684
+ ### Label
685
+
686
+ The `label` prop is required for the filter to be displayed. It is used to describe the filter to the user.
687
+
688
+ When the filter has selected options, it will append the label of the first option, or the number of selected options if `multiSelect` is true and there is more than one item selected.
689
+
690
+ [](./iframe.html?id=components-filter--label)
691
+
692
+ Custom label
693
+
694
+ None selected
695
+
696
+ Hide codedrawOpen in CodeSandbox
697
+
698
+ <IressFilter
699
+ label\="Custom label"
700
+ multiSelect
701
+ options\={\[
702
+ {
703
+ label: 'Option 1',
704
+ value: 1
705
+ },
706
+ {
707
+ label: 'Option 2',
708
+ value: 2
709
+ },
710
+ {
711
+ label: 'Option 3',
712
+ value: 3
713
+ },
714
+ {
715
+ label: 'Option 4',
716
+ value: 4
717
+ },
718
+ {
719
+ label: 'Option 5',
720
+ value: 5
721
+ }
722
+ \]}
723
+ popoverProps\={{
724
+ container: {}
725
+ }}
726
+ />
727
+
728
+ ```
729
+
730
+ #### Props
731
+
732
+ | Name | Description | Default | Control |
733
+ | --- | --- | --- | --- |
734
+ | defaultValue |
735
+ Value of selected option for uncontrolled filter.
736
+
737
+ union
738
+
739
+
740
+
741
+ | \- | Set object |
742
+ | inputProps |
743
+
744
+ Customise the searchable `IressInput` props for your needs.
745
+
746
+ Pick
747
+
748
+
749
+
750
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
751
+ | label\* |
752
+
753
+ Label to display in the activator button.
754
+
755
+ ReactNode
756
+
757
+
758
+
759
+ | \- |
760
+
761
+ "Custom label"
762
+
763
+ |
764
+ | limitDesktop |
765
+
766
+ |
767
+
768
+ 12
769
+
770
+ | Set object |
771
+ | limitMobile |
772
+
773
+ |
774
+
775
+ 6
776
+
777
+ | Set object |
778
+ | multiSelect |
779
+
780
+ Multi-select mode. When `true`, multiple options can be selected.
781
+
782
+ boolean
783
+
784
+
785
+
786
+ | \- | FalseTrue |
787
+ | onChange |
788
+
789
+ Emitted when the value changes.
790
+
791
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
792
+
793
+ | \- | \- |
794
+ | onReset |
795
+
796
+ Emitted when the value is reset.
797
+
798
+ () => void
799
+
800
+ | \- | \- |
801
+ | options |
802
+
803
+ array
804
+
805
+
806
+
807
+ | \- |
808
+
809
+ Edit JSON
810
+
811
+ * options :
812
+
813
+ \[
814
+
815
+ * 0 :
816
+
817
+ {...} 2 keys
818
+
819
+ * 1 :
820
+
821
+ {...} 2 keys
822
+
823
+ * 2 :
824
+
825
+ {...} 2 keys
826
+
827
+ * 3 :
828
+
829
+ {...} 2 keys
830
+
831
+ * 4 :
832
+
833
+ {...} 2 keys
834
+
835
+
836
+ \]
837
+
838
+
839
+
840
+
841
+ |
842
+ | popoverProps |
843
+
844
+ Customise the IressPopover props for your needs.
845
+
846
+ FilterPopoverProps
847
+
848
+
849
+
850
+ | { align: 'bottom-start' } |
851
+
852
+ Edit JSON
853
+
854
+ popoverProps :
855
+
856
+ {
857
+
858
+ }
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+ |
867
+ | searchable |
868
+
869
+ When `true` a search field is shown to search for specific filter option(s).
870
+
871
+ boolean
872
+
873
+
874
+
875
+ | \- | Set boolean |
876
+ | searchNoResultsText |
877
+
878
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
879
+
880
+ ReactNode
881
+
882
+
883
+
884
+ | \- | Set object |
885
+ | selectedOptionsText |
886
+
887
+ Text displayed next to label when two or more options are selected.
888
+
889
+ string
890
+
891
+
892
+
893
+ | \- | Set string |
894
+ | value |
895
+
896
+ Value of selected option for controlled filter.
897
+
898
+ union
899
+
900
+
901
+
902
+ | \- | Set object |
903
+ | visibleResetButton |
904
+
905
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
906
+
907
+ union
908
+
909
+
910
+
911
+ | \- | Set object |
912
+
913
+ ### Uncontrolled
914
+
915
+ The `defaultValue` prop can be used to set the initial value of the combobox. The value will be managed by the component.
916
+
917
+ **Note:** The `defaultValue` prop is not checked against the options provided, allowing it to work with asynchronous options.
918
+
919
+ [](./iframe.html?id=components-filter--uncontrolled)
920
+
921
+ Filter: Option 1
922
+
923
+ None selected
924
+
925
+ Hide codedrawOpen in CodeSandbox
926
+
927
+ <IressFilter
928
+ defaultValue\={{
929
+ label: 'Option 1',
930
+ value: 1
931
+ }}
932
+ label\="Filter"
933
+ options\={\[
934
+ {
935
+ label: 'Option 1',
936
+ value: 1
937
+ },
938
+ {
939
+ label: 'Option 2',
940
+ value: 2
941
+ },
942
+ {
943
+ label: 'Option 3',
944
+ value: 3
945
+ },
946
+ {
947
+ label: 'Option 4',
948
+ value: 4
949
+ },
950
+ {
951
+ label: 'Option 5',
952
+ value: 5
953
+ }
954
+ \]}
955
+ popoverProps\={{
956
+ container: {}
957
+ }}
958
+ />
959
+
960
+ ```
961
+
962
+ #### Props
963
+
964
+ | Name | Description | Default | Control |
965
+ | --- | --- | --- | --- |
966
+ | defaultValue |
967
+ Value of selected option for uncontrolled filter.
968
+
969
+ union
970
+
971
+
972
+
973
+ | \- |
974
+
975
+ Edit JSON
976
+
977
+ defaultValue :
978
+
979
+ {
980
+
981
+ * label : "Option 1"
982
+ * value : 1
983
+
984
+ }
985
+
986
+
987
+
988
+
989
+
990
+
991
+
992
+ |
993
+ | inputProps |
994
+
995
+ Customise the searchable `IressInput` props for your needs.
996
+
997
+ Pick
998
+
999
+
1000
+
1001
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
1002
+ | label\* |
1003
+
1004
+ Label to display in the activator button.
1005
+
1006
+ ReactNode
1007
+
1008
+
1009
+
1010
+ | \- |
1011
+
1012
+ "Filter"
1013
+
1014
+ |
1015
+ | limitDesktop |
1016
+
1017
+ |
1018
+
1019
+ 12
1020
+
1021
+ | Set object |
1022
+ | limitMobile |
1023
+
1024
+ |
1025
+
1026
+ 6
1027
+
1028
+ | Set object |
1029
+ | multiSelect |
1030
+
1031
+ Multi-select mode. When `true`, multiple options can be selected.
1032
+
1033
+ boolean
1034
+
1035
+
1036
+
1037
+ | \- | Set boolean |
1038
+ | onChange |
1039
+
1040
+ Emitted when the value changes.
1041
+
1042
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
1043
+
1044
+ | \- | \- |
1045
+ | onReset |
1046
+
1047
+ Emitted when the value is reset.
1048
+
1049
+ () => void
1050
+
1051
+ | \- | \- |
1052
+ | options |
1053
+
1054
+ array
1055
+
1056
+
1057
+
1058
+ | \- |
1059
+
1060
+ Edit JSON
1061
+
1062
+ * options :
1063
+
1064
+ \[
1065
+
1066
+ * 0 :
1067
+
1068
+ {...} 2 keys
1069
+
1070
+ * 1 :
1071
+
1072
+ {...} 2 keys
1073
+
1074
+ * 2 :
1075
+
1076
+ {...} 2 keys
1077
+
1078
+ * 3 :
1079
+
1080
+ {...} 2 keys
1081
+
1082
+ * 4 :
1083
+
1084
+ {...} 2 keys
1085
+
1086
+
1087
+ \]
1088
+
1089
+
1090
+
1091
+
1092
+ |
1093
+ | popoverProps |
1094
+
1095
+ Customise the IressPopover props for your needs.
1096
+
1097
+ FilterPopoverProps
1098
+
1099
+
1100
+
1101
+ | { align: 'bottom-start' } |
1102
+
1103
+ Edit JSON
1104
+
1105
+ popoverProps :
1106
+
1107
+ {
1108
+
1109
+ }
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+ |
1118
+ | searchable |
1119
+
1120
+ When `true` a search field is shown to search for specific filter option(s).
1121
+
1122
+ boolean
1123
+
1124
+
1125
+
1126
+ | \- | Set boolean |
1127
+ | searchNoResultsText |
1128
+
1129
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
1130
+
1131
+ ReactNode
1132
+
1133
+
1134
+
1135
+ | \- | Set object |
1136
+ | selectedOptionsText |
1137
+
1138
+ Text displayed next to label when two or more options are selected.
1139
+
1140
+ string
1141
+
1142
+
1143
+
1144
+ | \- | Set string |
1145
+ | value |
1146
+
1147
+ Value of selected option for controlled filter.
1148
+
1149
+ union
1150
+
1151
+
1152
+
1153
+ | \- | Set object |
1154
+ | visibleResetButton |
1155
+
1156
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
1157
+
1158
+ union
1159
+
1160
+
1161
+
1162
+ | \- | Set object |
1163
+
1164
+ ### Controlled
1165
+
1166
+ The `value` prop can be used to completely control the state of the component. Use the `onChange` and `onReset` props to sync your state with the component.
1167
+
1168
+ **Note:** The `value` prop is not checked against the options provided, allowing it to work with asynchronous options.
1169
+
1170
+ [](./iframe.html?id=components-filter--controlled)
1171
+
1172
+ Filter
1173
+
1174
+ None selected
1175
+
1176
+ Hide codedrawOpen in CodeSandbox
1177
+
1178
+ import { IressFilter, type IressFilterProps } from '@/main';
1179
+ import { useState } from 'react';
1180
+ export const FilterUsingState \= () \=> {
1181
+ const \[value, setValue\] \= useState<IressFilterProps\['value'\]\>();
1182
+ return (
1183
+ <IressFilter
1184
+ {...{
1185
+ label: 'Filter',
1186
+ options: \[
1187
+ {
1188
+ label: 'Option 1',
1189
+ value: 1,
1190
+ },
1191
+ {
1192
+ label: 'Option 2',
1193
+ value: 2,
1194
+ },
1195
+ {
1196
+ label: 'Option 3',
1197
+ value: 3,
1198
+ },
1199
+ {
1200
+ label: 'Option 4',
1201
+ value: 4,
1202
+ },
1203
+ {
1204
+ label: 'Option 5',
1205
+ value: 5,
1206
+ },
1207
+ \],
1208
+ popoverProps: {
1209
+ container: {},
1210
+ },
1211
+ }}
1212
+ onChange\={(newValue) \=> setValue(newValue)}
1213
+ onReset\={() \=> setValue(undefined)}
1214
+ value\={value}
1215
+ />
1216
+ );
1217
+ };
1218
+
1219
+ ```
1220
+
1221
+ #### Props
1222
+
1223
+ | Name | Description | Default | Control |
1224
+ | --- | --- | --- | --- |
1225
+ | defaultValue |
1226
+ Value of selected option for uncontrolled filter.
1227
+
1228
+ union
1229
+
1230
+
1231
+
1232
+ | \- | \- |
1233
+ | inputProps |
1234
+
1235
+ Customise the searchable `IressInput` props for your needs.
1236
+
1237
+ Pick
1238
+
1239
+
1240
+
1241
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
1242
+ | label\* |
1243
+
1244
+ Label to display in the activator button.
1245
+
1246
+ ReactNode
1247
+
1248
+
1249
+
1250
+ | \- |
1251
+
1252
+ "Filter"
1253
+
1254
+ |
1255
+ | limitDesktop |
1256
+
1257
+ |
1258
+
1259
+ 12
1260
+
1261
+ | Set object |
1262
+ | limitMobile |
1263
+
1264
+ |
1265
+
1266
+ 6
1267
+
1268
+ | Set object |
1269
+ | multiSelect |
1270
+
1271
+ Multi-select mode. When `true`, multiple options can be selected.
1272
+
1273
+ boolean
1274
+
1275
+
1276
+
1277
+ | \- | Set boolean |
1278
+ | onChange |
1279
+
1280
+ Emitted when the value changes.
1281
+
1282
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
1283
+
1284
+ | \- | \- |
1285
+ | onReset |
1286
+
1287
+ Emitted when the value is reset.
1288
+
1289
+ () => void
1290
+
1291
+ | \- | \- |
1292
+ | options |
1293
+
1294
+ array
1295
+
1296
+
1297
+
1298
+ | \- |
1299
+
1300
+ Edit JSON
1301
+
1302
+ * options :
1303
+
1304
+ \[
1305
+
1306
+ * 0 :
1307
+
1308
+ {...} 2 keys
1309
+
1310
+ * 1 :
1311
+
1312
+ {...} 2 keys
1313
+
1314
+ * 2 :
1315
+
1316
+ {...} 2 keys
1317
+
1318
+ * 3 :
1319
+
1320
+ {...} 2 keys
1321
+
1322
+ * 4 :
1323
+
1324
+ {...} 2 keys
1325
+
1326
+
1327
+ \]
1328
+
1329
+
1330
+
1331
+
1332
+ |
1333
+ | popoverProps |
1334
+
1335
+ Customise the IressPopover props for your needs.
1336
+
1337
+ FilterPopoverProps
1338
+
1339
+
1340
+
1341
+ | { align: 'bottom-start' } |
1342
+
1343
+ Edit JSON
1344
+
1345
+ popoverProps :
1346
+
1347
+ {
1348
+
1349
+ }
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+ |
1358
+ | searchable |
1359
+
1360
+ When `true` a search field is shown to search for specific filter option(s).
1361
+
1362
+ boolean
1363
+
1364
+
1365
+
1366
+ | \- | Set boolean |
1367
+ | searchNoResultsText |
1368
+
1369
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
1370
+
1371
+ ReactNode
1372
+
1373
+
1374
+
1375
+ | \- | Set object |
1376
+ | selectedOptionsText |
1377
+
1378
+ Text displayed next to label when two or more options are selected.
1379
+
1380
+ string
1381
+
1382
+
1383
+
1384
+ | \- | Set string |
1385
+ | value |
1386
+
1387
+ Value of selected option for controlled filter.
1388
+
1389
+ union
1390
+
1391
+
1392
+
1393
+ | \- | \- |
1394
+ | visibleResetButton |
1395
+
1396
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
1397
+
1398
+ union
1399
+
1400
+
1401
+
1402
+ | \- | Set object |
1403
+
1404
+ ### Multiple selection
1405
+
1406
+ Using the `multiSelect` prop, the `IressFilter` will allow the user to make multiple selections.
1407
+
1408
+ [](./iframe.html?id=components-filter--multi-select)
1409
+
1410
+ Filter
1411
+
1412
+ None selected
1413
+
1414
+ Hide codedrawOpen in CodeSandbox
1415
+
1416
+ <IressFilter
1417
+ label\="Filter"
1418
+ multiSelect
1419
+ options\={\[
1420
+ {
1421
+ label: 'Option 1',
1422
+ value: 1
1423
+ },
1424
+ {
1425
+ label: 'Option 2',
1426
+ value: 2
1427
+ },
1428
+ {
1429
+ label: 'Option 3',
1430
+ value: 3
1431
+ },
1432
+ {
1433
+ label: 'Option 4',
1434
+ value: 4
1435
+ },
1436
+ {
1437
+ label: 'Option 5',
1438
+ value: 5
1439
+ }
1440
+ \]}
1441
+ popoverProps\={{
1442
+ container: {}
1443
+ }}
1444
+ />
1445
+
1446
+ ```
1447
+
1448
+ #### Props
1449
+
1450
+ | Name | Description | Default | Control |
1451
+ | --- | --- | --- | --- |
1452
+ | defaultValue |
1453
+ Value of selected option for uncontrolled filter.
1454
+
1455
+ union
1456
+
1457
+
1458
+
1459
+ | \- | Set object |
1460
+ | inputProps |
1461
+
1462
+ Customise the searchable `IressInput` props for your needs.
1463
+
1464
+ Pick
1465
+
1466
+
1467
+
1468
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
1469
+ | label\* |
1470
+
1471
+ Label to display in the activator button.
1472
+
1473
+ ReactNode
1474
+
1475
+
1476
+
1477
+ | \- |
1478
+
1479
+ "Filter"
1480
+
1481
+ |
1482
+ | limitDesktop |
1483
+
1484
+ |
1485
+
1486
+ 12
1487
+
1488
+ | Set object |
1489
+ | limitMobile |
1490
+
1491
+ |
1492
+
1493
+ 6
1494
+
1495
+ | Set object |
1496
+ | multiSelect |
1497
+
1498
+ Multi-select mode. When `true`, multiple options can be selected.
1499
+
1500
+ boolean
1501
+
1502
+
1503
+
1504
+ | \- | FalseTrue |
1505
+ | onChange |
1506
+
1507
+ Emitted when the value changes.
1508
+
1509
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
1510
+
1511
+ | \- | \- |
1512
+ | onReset |
1513
+
1514
+ Emitted when the value is reset.
1515
+
1516
+ () => void
1517
+
1518
+ | \- | \- |
1519
+ | options |
1520
+
1521
+ array
1522
+
1523
+
1524
+
1525
+ | \- |
1526
+
1527
+ Edit JSON
1528
+
1529
+ * options :
1530
+
1531
+ \[
1532
+
1533
+ * 0 :
1534
+
1535
+ {...} 2 keys
1536
+
1537
+ * 1 :
1538
+
1539
+ {...} 2 keys
1540
+
1541
+ * 2 :
1542
+
1543
+ {...} 2 keys
1544
+
1545
+ * 3 :
1546
+
1547
+ {...} 2 keys
1548
+
1549
+ * 4 :
1550
+
1551
+ {...} 2 keys
1552
+
1553
+
1554
+ \]
1555
+
1556
+
1557
+
1558
+
1559
+ |
1560
+ | popoverProps |
1561
+
1562
+ Customise the IressPopover props for your needs.
1563
+
1564
+ FilterPopoverProps
1565
+
1566
+
1567
+
1568
+ | { align: 'bottom-start' } |
1569
+
1570
+ Edit JSON
1571
+
1572
+ popoverProps :
1573
+
1574
+ {
1575
+
1576
+ }
1577
+
1578
+
1579
+
1580
+
1581
+
1582
+
1583
+
1584
+ |
1585
+ | searchable |
1586
+
1587
+ When `true` a search field is shown to search for specific filter option(s).
1588
+
1589
+ boolean
1590
+
1591
+
1592
+
1593
+ | \- | Set boolean |
1594
+ | searchNoResultsText |
1595
+
1596
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
1597
+
1598
+ ReactNode
1599
+
1600
+
1601
+
1602
+ | \- | Set object |
1603
+ | selectedOptionsText |
1604
+
1605
+ Text displayed next to label when two or more options are selected.
1606
+
1607
+ string
1608
+
1609
+
1610
+
1611
+ | \- | Set string |
1612
+ | value |
1613
+
1614
+ Value of selected option for controlled filter.
1615
+
1616
+ union
1617
+
1618
+
1619
+
1620
+ | \- | Set object |
1621
+ | visibleResetButton |
1622
+
1623
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
1624
+
1625
+ union
1626
+
1627
+
1628
+
1629
+ | \- | Set object |
1630
+
1631
+ ### Providing options
1632
+
1633
+ #### `options`
1634
+
1635
+ The `options` prop is required for the combobox. You can provide an array of `LabelValueMeta[]` objects to the `options` prop. Filtering is done based on the `label` property.
1636
+
1637
+ [](./iframe.html?id=components-filter--options)
1638
+
1639
+ Filter
1640
+
1641
+ None selected
1642
+
1643
+ Hide codedrawOpen in CodeSandbox
1644
+
1645
+ <IressFilter
1646
+ label\="Filter"
1647
+ options\={\[
1648
+ {
1649
+ label: 'Option 1',
1650
+ value: 1
1651
+ },
1652
+ {
1653
+ label: 'Option 2',
1654
+ value: 2
1655
+ },
1656
+ {
1657
+ label: 'Option 3',
1658
+ value: 3
1659
+ },
1660
+ {
1661
+ label: 'Option 4',
1662
+ value: 4
1663
+ },
1664
+ {
1665
+ label: 'Option 5',
1666
+ value: 5
1667
+ }
1668
+ \]}
1669
+ popoverProps\={{
1670
+ container: {}
1671
+ }}
1672
+ />
1673
+
1674
+ ```
1675
+
1676
+ #### Props
1677
+
1678
+ | Name | Description | Default | Control |
1679
+ | --- | --- | --- | --- |
1680
+ | defaultValue |
1681
+ Value of selected option for uncontrolled filter.
1682
+
1683
+ union
1684
+
1685
+
1686
+
1687
+ | \- | Set object |
1688
+ | inputProps |
1689
+
1690
+ Customise the searchable `IressInput` props for your needs.
1691
+
1692
+ Pick
1693
+
1694
+
1695
+
1696
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
1697
+ | label\* |
1698
+
1699
+ Label to display in the activator button.
1700
+
1701
+ ReactNode
1702
+
1703
+
1704
+
1705
+ | \- |
1706
+
1707
+ "Filter"
1708
+
1709
+ |
1710
+ | limitDesktop |
1711
+
1712
+ |
1713
+
1714
+ 12
1715
+
1716
+ | Set object |
1717
+ | limitMobile |
1718
+
1719
+ |
1720
+
1721
+ 6
1722
+
1723
+ | Set object |
1724
+ | multiSelect |
1725
+
1726
+ Multi-select mode. When `true`, multiple options can be selected.
1727
+
1728
+ boolean
1729
+
1730
+
1731
+
1732
+ | \- | Set boolean |
1733
+ | onChange |
1734
+
1735
+ Emitted when the value changes.
1736
+
1737
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
1738
+
1739
+ | \- | \- |
1740
+ | onReset |
1741
+
1742
+ Emitted when the value is reset.
1743
+
1744
+ () => void
1745
+
1746
+ | \- | \- |
1747
+ | options |
1748
+
1749
+ array
1750
+
1751
+
1752
+
1753
+ | \- |
1754
+
1755
+ Edit JSON
1756
+
1757
+ * options :
1758
+
1759
+ \[
1760
+
1761
+ * 0 :
1762
+
1763
+ {...} 2 keys
1764
+
1765
+ * 1 :
1766
+
1767
+ {...} 2 keys
1768
+
1769
+ * 2 :
1770
+
1771
+ {...} 2 keys
1772
+
1773
+ * 3 :
1774
+
1775
+ {...} 2 keys
1776
+
1777
+ * 4 :
1778
+
1779
+ {...} 2 keys
1780
+
1781
+
1782
+ \]
1783
+
1784
+
1785
+
1786
+
1787
+ |
1788
+ | popoverProps |
1789
+
1790
+ Customise the IressPopover props for your needs.
1791
+
1792
+ FilterPopoverProps
1793
+
1794
+
1795
+
1796
+ | { align: 'bottom-start' } |
1797
+
1798
+ Edit JSON
1799
+
1800
+ popoverProps :
1801
+
1802
+ {
1803
+
1804
+ }
1805
+
1806
+
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+ |
1813
+ | searchable |
1814
+
1815
+ When `true` a search field is shown to search for specific filter option(s).
1816
+
1817
+ boolean
1818
+
1819
+
1820
+
1821
+ | \- | Set boolean |
1822
+ | searchNoResultsText |
1823
+
1824
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
1825
+
1826
+ ReactNode
1827
+
1828
+
1829
+
1830
+ | \- | Set object |
1831
+ | selectedOptionsText |
1832
+
1833
+ Text displayed next to label when two or more options are selected.
1834
+
1835
+ string
1836
+
1837
+
1838
+
1839
+ | \- | Set string |
1840
+ | value |
1841
+
1842
+ Value of selected option for controlled filter.
1843
+
1844
+ union
1845
+
1846
+
1847
+
1848
+ | \- | Set object |
1849
+ | visibleResetButton |
1850
+
1851
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
1852
+
1853
+ union
1854
+
1855
+
1856
+
1857
+ | \- | Set object |
1858
+
1859
+ #### Asynchronous `options`
1860
+
1861
+ If you would like to render suggestions from the server, you can pass a function to the `options` prop. It accepts a string parameter and returns a promise that resolves to an array of `LabelValueMeta[]` objects. No filtering is done for asynchronous options, you must filter the options yourself using the query.
1862
+
1863
+ **Note:** Asynchronous `options` will automatically set the `searchable` prop to true.
1864
+
1865
+ [](./iframe.html?id=components-filter--async-options)
1866
+
1867
+ Filter
1868
+
1869
+ None selected
1870
+
1871
+ Hide codedrawOpen in CodeSandbox
1872
+
1873
+ import { IressFilter, type IressFilterProps } from '@/main';
1874
+ interface StarWarsCharacter {
1875
+ name: string;
1876
+ gender: string;
1877
+ }
1878
+ interface StarWarsCharacterApi {
1879
+ results: StarWarsCharacter\[\];
1880
+ }
1881
+ export const FilterUsingAsync \= () \=> (
1882
+ <IressFilter
1883
+ {...{
1884
+ label: 'Filter',
1885
+ options: \[
1886
+ {
1887
+ label: 'Option 1',
1888
+ value: 1,
1889
+ },
1890
+ {
1891
+ label: 'Option 2',
1892
+ value: 2,
1893
+ },
1894
+ {
1895
+ label: 'Option 3',
1896
+ value: 3,
1897
+ },
1898
+ {
1899
+ label: 'Option 4',
1900
+ value: 4,
1901
+ },
1902
+ {
1903
+ label: 'Option 5',
1904
+ value: 5,
1905
+ },
1906
+ \],
1907
+ popoverProps: {
1908
+ container: {},
1909
+ },
1910
+ searchable: true,
1911
+ }}
1912
+ options\={async (query: string) \=> {
1913
+ if (!query) return \[\];
1914
+ const data \= await fetch(
1915
+ \`https://swapi.py4e.com/api/people/?search=${query}\`,
1916
+ ).then((response) \=> response.json() as Promise<StarWarsCharacterApi\>);
1917
+ return data.results.map((character: StarWarsCharacter) \=> ({
1918
+ label: character.name,
1919
+ value: character.name,
1920
+ meta: character.gender,
1921
+ }));
1922
+ }}
1923
+ />
1924
+ );
1925
+
1926
+ ```
1927
+
1928
+ #### Props
1929
+
1930
+ | Name | Description | Default | Control |
1931
+ | --- | --- | --- | --- |
1932
+ | defaultValue |
1933
+ Value of selected option for uncontrolled filter.
1934
+
1935
+ union
1936
+
1937
+
1938
+
1939
+ | \- | Set object |
1940
+ | inputProps |
1941
+
1942
+ Customise the searchable `IressInput` props for your needs.
1943
+
1944
+ Pick
1945
+
1946
+
1947
+
1948
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
1949
+ | label\* |
1950
+
1951
+ Label to display in the activator button.
1952
+
1953
+ ReactNode
1954
+
1955
+
1956
+
1957
+ | \- |
1958
+
1959
+ "Filter"
1960
+
1961
+ |
1962
+ | limitDesktop |
1963
+
1964
+ |
1965
+
1966
+ 12
1967
+
1968
+ | Set object |
1969
+ | limitMobile |
1970
+
1971
+ |
1972
+
1973
+ 6
1974
+
1975
+ | Set object |
1976
+ | multiSelect |
1977
+
1978
+ Multi-select mode. When `true`, multiple options can be selected.
1979
+
1980
+ boolean
1981
+
1982
+
1983
+
1984
+ | \- | Set boolean |
1985
+ | onChange |
1986
+
1987
+ Emitted when the value changes.
1988
+
1989
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
1990
+
1991
+ | \- | \- |
1992
+ | onReset |
1993
+
1994
+ Emitted when the value is reset.
1995
+
1996
+ () => void
1997
+
1998
+ | \- | \- |
1999
+ | options |
2000
+
2001
+ array
2002
+
2003
+
2004
+
2005
+ | \- | \- |
2006
+ | popoverProps |
2007
+
2008
+ Customise the IressPopover props for your needs.
2009
+
2010
+ FilterPopoverProps
2011
+
2012
+
2013
+
2014
+ | { align: 'bottom-start' } |
2015
+
2016
+ Edit JSON
2017
+
2018
+ popoverProps :
2019
+
2020
+ {
2021
+
2022
+ }
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+
2030
+ |
2031
+ | searchable |
2032
+
2033
+ When `true` a search field is shown to search for specific filter option(s).
2034
+
2035
+ boolean
2036
+
2037
+
2038
+
2039
+ | \- | FalseTrue |
2040
+ | searchNoResultsText |
2041
+
2042
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
2043
+
2044
+ ReactNode
2045
+
2046
+
2047
+
2048
+ | \- | Set object |
2049
+ | selectedOptionsText |
2050
+
2051
+ Text displayed next to label when two or more options are selected.
2052
+
2053
+ string
2054
+
2055
+
2056
+
2057
+ | \- | Set string |
2058
+ | value |
2059
+
2060
+ Value of selected option for controlled filter.
2061
+
2062
+ union
2063
+
2064
+
2065
+
2066
+ | \- | Set object |
2067
+ | visibleResetButton |
2068
+
2069
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
2070
+
2071
+ union
2072
+
2073
+
2074
+
2075
+ | \- | Set object |
2076
+
2077
+ #### `initialOptions`
2078
+
2079
+ If you want to provide initial options to the user, you can use the `initialOptions` prop. This is useful when you want to provide a list of options to the user before they start typing (eg. recommended search terms).
2080
+
2081
+ **Note:** `initialOptions` only works if `searchable` is true.
2082
+
2083
+ [](./iframe.html?id=components-filter--initial-options)
2084
+
2085
+ Filter
2086
+
2087
+ None selected
2088
+
2089
+ Hide codedrawOpen in CodeSandbox
2090
+
2091
+ <IressFilter
2092
+ initialOptions\={\[
2093
+ {
2094
+ label: 'Favourite option 1',
2095
+ value: 'fav-1'
2096
+ },
2097
+ {
2098
+ label: 'Favourite option 2',
2099
+ value: 'fav-2'
2100
+ },
2101
+ {
2102
+ label: 'Favourite option 3',
2103
+ value: 'fav-3'
2104
+ }
2105
+ \]}
2106
+ label\="Filter"
2107
+ options\={\[
2108
+ {
2109
+ label: 'Option 1',
2110
+ value: 1
2111
+ },
2112
+ {
2113
+ label: 'Option 2',
2114
+ value: 2
2115
+ },
2116
+ {
2117
+ label: 'Option 3',
2118
+ value: 3
2119
+ },
2120
+ {
2121
+ label: 'Option 4',
2122
+ value: 4
2123
+ },
2124
+ {
2125
+ label: 'Option 5',
2126
+ value: 5
2127
+ }
2128
+ \]}
2129
+ popoverProps\={{
2130
+ container: {}
2131
+ }}
2132
+ searchable
2133
+ />
2134
+
2135
+ ```
2136
+
2137
+ #### Props
2138
+
2139
+ | Name | Description | Default | Control |
2140
+ | --- | --- | --- | --- |
2141
+ | defaultValue |
2142
+ Value of selected option for uncontrolled filter.
2143
+
2144
+ union
2145
+
2146
+
2147
+
2148
+ | \- | Set object |
2149
+ | initialOptions |
2150
+
2151
+ array
2152
+
2153
+
2154
+
2155
+ | \- |
2156
+
2157
+ Edit JSON
2158
+
2159
+ * initialOptions :
2160
+
2161
+ \[
2162
+
2163
+ * 0 :
2164
+
2165
+ {...} 2 keys
2166
+
2167
+ * 1 :
2168
+
2169
+ {...} 2 keys
2170
+
2171
+ * 2 :
2172
+
2173
+ {...} 2 keys
2174
+
2175
+
2176
+ \]
2177
+
2178
+
2179
+
2180
+
2181
+ |
2182
+ | inputProps |
2183
+
2184
+ Customise the searchable `IressInput` props for your needs.
2185
+
2186
+ Pick
2187
+
2188
+
2189
+
2190
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
2191
+ | label\* |
2192
+
2193
+ Label to display in the activator button.
2194
+
2195
+ ReactNode
2196
+
2197
+
2198
+
2199
+ | \- |
2200
+
2201
+ "Filter"
2202
+
2203
+ |
2204
+ | limitDesktop |
2205
+
2206
+ |
2207
+
2208
+ 12
2209
+
2210
+ | Set object |
2211
+ | limitMobile |
2212
+
2213
+ |
2214
+
2215
+ 6
2216
+
2217
+ | Set object |
2218
+ | multiSelect |
2219
+
2220
+ Multi-select mode. When `true`, multiple options can be selected.
2221
+
2222
+ boolean
2223
+
2224
+
2225
+
2226
+ | \- | Set boolean |
2227
+ | onChange |
2228
+
2229
+ Emitted when the value changes.
2230
+
2231
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
2232
+
2233
+ | \- | \- |
2234
+ | onReset |
2235
+
2236
+ Emitted when the value is reset.
2237
+
2238
+ () => void
2239
+
2240
+ | \- | \- |
2241
+ | options |
2242
+
2243
+ array
2244
+
2245
+
2246
+
2247
+ | \- |
2248
+
2249
+ Edit JSON
2250
+
2251
+ * options :
2252
+
2253
+ \[
2254
+
2255
+ * 0 :
2256
+
2257
+ {...} 2 keys
2258
+
2259
+ * 1 :
2260
+
2261
+ {...} 2 keys
2262
+
2263
+ * 2 :
2264
+
2265
+ {...} 2 keys
2266
+
2267
+ * 3 :
2268
+
2269
+ {...} 2 keys
2270
+
2271
+ * 4 :
2272
+
2273
+ {...} 2 keys
2274
+
2275
+
2276
+ \]
2277
+
2278
+
2279
+
2280
+
2281
+ |
2282
+ | popoverProps |
2283
+
2284
+ Customise the IressPopover props for your needs.
2285
+
2286
+ FilterPopoverProps
2287
+
2288
+
2289
+
2290
+ | { align: 'bottom-start' } |
2291
+
2292
+ Edit JSON
2293
+
2294
+ popoverProps :
2295
+
2296
+ {
2297
+
2298
+ }
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+ |
2307
+ | searchable |
2308
+
2309
+ When `true` a search field is shown to search for specific filter option(s).
2310
+
2311
+ boolean
2312
+
2313
+
2314
+
2315
+ | \- | FalseTrue |
2316
+ | searchNoResultsText |
2317
+
2318
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
2319
+
2320
+ ReactNode
2321
+
2322
+
2323
+
2324
+ | \- | Set object |
2325
+ | selectedOptionsText |
2326
+
2327
+ Text displayed next to label when two or more options are selected.
2328
+
2329
+ string
2330
+
2331
+
2332
+
2333
+ | \- | Set string |
2334
+ | value |
2335
+
2336
+ Value of selected option for controlled filter.
2337
+
2338
+ union
2339
+
2340
+
2341
+
2342
+ | \- | Set object |
2343
+ | visibleResetButton |
2344
+
2345
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
2346
+
2347
+ union
2348
+
2349
+
2350
+
2351
+ | \- | Set object |
2352
+
2353
+ ### Complex Options
2354
+
2355
+ The options prop also accepts further properties for each option. This is useful for displaying other data that compliments the main label.
2356
+
2357
+ * append: accepts a ReactNode to append to the end of the option, usually a badge.
2358
+ * meta: accepts a ReactNode to display additional information about the option.
2359
+ * prepend: accepts a ReactNode to add to the start of the option, usually an icon.
2360
+
2361
+ All `IressFilter`s accept meta as an attribute in the option array.
2362
+
2363
+ [](./iframe.html?id=components-filter--complex-options)
2364
+
2365
+ User
2366
+
2367
+ None selected
2368
+
2369
+ Hide codedrawOpen in CodeSandbox
2370
+
2371
+ <IressFilter
2372
+ label\="User"
2373
+ options\={\[
2374
+ {
2375
+ label: 'John Smith',
2376
+ meta: \[
2377
+ <IressText key\="opt1-type" element\="small" mode\="muted"\>Individual</IressText\>,
2378
+ <IressText key\="opt1-email" element\="small" mode\="muted"\>test@iress.com</IressText\>
2379
+ \],
2380
+ value: 'opt1'
2381
+ },
2382
+ {
2383
+ label: 'Tom Wilson',
2384
+ meta: \[
2385
+ <IressText key\="opt2-type" element\="small" mode\="muted"\>Individual</IressText\>
2386
+ \],
2387
+ value: 'opt2'
2388
+ },
2389
+ {
2390
+ append: <IressBadge mode\="success"\>Active</IressBadge\>,
2391
+ label: 'Alice Kay',
2392
+ meta: \[
2393
+ <IressText key\="opt3-type" element\="small" mode\="muted"\>Individual</IressText\>
2394
+ \],
2395
+ value: 'opt3'
2396
+ },
2397
+ {
2398
+ label: 'John Smith',
2399
+ meta: \[
2400
+ <IressText key\="opt4-type" element\="small" mode\="muted"\>Business</IressText\>,
2401
+ <IressText key\="opt4-phone" element\="small" mode\="muted"\>0432325675</IressText\>
2402
+ \],
2403
+ value: 'opt4'
2404
+ },
2405
+ {
2406
+ label: 'Eelin Team',
2407
+ meta: \[
2408
+ <IressText key\="opt5-contact" element\="small" mode\="muted"\>test2@iress.com, 0432325675</IressText\>
2409
+ \],
2410
+ value: 'opt5'
2411
+ },
2412
+ {
2413
+ label: 'Eelin Team',
2414
+ meta: \[
2415
+ <IressText key\="opt6-contact" element\="small" mode\="muted"\>test3@iress.com, 0439873244</IressText\>
2416
+ \],
2417
+ value: 'opt6'
2418
+ }
2419
+ \]}
2420
+ popoverProps\={{
2421
+ container: {}
2422
+ }}
2423
+ />
2424
+
2425
+ ```
2426
+
2427
+ #### Props
2428
+
2429
+ | Name | Description | Default | Control |
2430
+ | --- | --- | --- | --- |
2431
+ | defaultValue |
2432
+ Value of selected option for uncontrolled filter.
2433
+
2434
+ union
2435
+
2436
+
2437
+
2438
+ | \- | Set object |
2439
+ | inputProps |
2440
+
2441
+ Customise the searchable `IressInput` props for your needs.
2442
+
2443
+ Pick
2444
+
2445
+
2446
+
2447
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
2448
+ | label\* |
2449
+
2450
+ Label to display in the activator button.
2451
+
2452
+ ReactNode
2453
+
2454
+
2455
+
2456
+ | \- |
2457
+
2458
+ "User"
2459
+
2460
+ |
2461
+ | limitDesktop |
2462
+
2463
+ |
2464
+
2465
+ 12
2466
+
2467
+ | Set object |
2468
+ | limitMobile |
2469
+
2470
+ |
2471
+
2472
+ 6
2473
+
2474
+ | Set object |
2475
+ | multiSelect |
2476
+
2477
+ Multi-select mode. When `true`, multiple options can be selected.
2478
+
2479
+ boolean
2480
+
2481
+
2482
+
2483
+ | \- | Set boolean |
2484
+ | onChange |
2485
+
2486
+ Emitted when the value changes.
2487
+
2488
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
2489
+
2490
+ | \- | \- |
2491
+ | onReset |
2492
+
2493
+ Emitted when the value is reset.
2494
+
2495
+ () => void
2496
+
2497
+ | \- | \- |
2498
+ | options |
2499
+
2500
+ array
2501
+
2502
+
2503
+
2504
+ | \- |
2505
+
2506
+ Edit JSON
2507
+
2508
+ * options :
2509
+
2510
+ \[
2511
+
2512
+ * 0 :
2513
+
2514
+ {...} 3 keys
2515
+
2516
+ * 1 :
2517
+
2518
+ {...} 3 keys
2519
+
2520
+ * 2 :
2521
+
2522
+ {...} 4 keys
2523
+
2524
+ * 3 :
2525
+
2526
+ {...} 3 keys
2527
+
2528
+ * 4 :
2529
+
2530
+ {...} 3 keys
2531
+
2532
+ * 5 :
2533
+
2534
+ {...} 3 keys
2535
+
2536
+
2537
+ \]
2538
+
2539
+
2540
+
2541
+
2542
+ |
2543
+ | popoverProps |
2544
+
2545
+ Customise the IressPopover props for your needs.
2546
+
2547
+ FilterPopoverProps
2548
+
2549
+
2550
+
2551
+ | { align: 'bottom-start' } |
2552
+
2553
+ Edit JSON
2554
+
2555
+ popoverProps :
2556
+
2557
+ {
2558
+
2559
+ }
2560
+
2561
+
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+ |
2568
+ | searchable |
2569
+
2570
+ When `true` a search field is shown to search for specific filter option(s).
2571
+
2572
+ boolean
2573
+
2574
+
2575
+
2576
+ | \- | Set boolean |
2577
+ | searchNoResultsText |
2578
+
2579
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
2580
+
2581
+ ReactNode
2582
+
2583
+
2584
+
2585
+ | \- | Set object |
2586
+ | selectedOptionsText |
2587
+
2588
+ Text displayed next to label when two or more options are selected.
2589
+
2590
+ string
2591
+
2592
+
2593
+
2594
+ | \- | Set string |
2595
+ | value |
2596
+
2597
+ Value of selected option for controlled filter.
2598
+
2599
+ union
2600
+
2601
+
2602
+
2603
+ | \- | Set object |
2604
+ | visibleResetButton |
2605
+
2606
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
2607
+
2608
+ union
2609
+
2610
+
2611
+
2612
+ | \- | Set object |
2613
+
2614
+ Behaviour
2615
+ ---------
2616
+
2617
+ * When the activator is tapped, the filter will open
2618
+ * Up and Down Arrow keys are used to navigate the options
2619
+ * When focus is on the search input:
2620
+ * Pressing the down key will move focus to the first menu item
2621
+ * If `visibleResetButton` is set to true, pressing the down key will focus the reset button instead
2622
+ * When focus is on the reset button:
2623
+ * Pressing the down key will move focus to the first menu item
2624
+ * Pressing the Space or Enter keys when focussed on an option will select it
2625
+ * Pressing the Escape key will close the filter and place focus back on to the activator button
2626
+
2627
+ Examples
2628
+ --------
2629
+
2630
+ ### Input props
2631
+
2632
+ You can customise some settings of the query input by setting the `inputProps`.
2633
+
2634
+ It does have some defaults to help with user experience. `prepend` automatically has a search icon, and `clearable` and `watermark` are set to true by default.
2635
+
2636
+ [](./iframe.html?id=components-filter--input-props)
2637
+
2638
+ Filter
2639
+
2640
+ None selected
2641
+
2642
+ Hide codedrawOpen in CodeSandbox
2643
+
2644
+ <IressFilter
2645
+ inputProps\={{
2646
+ placeholder: 'Search...'
2647
+ }}
2648
+ label\="Filter"
2649
+ options\={\[
2650
+ {
2651
+ label: 'Option 1',
2652
+ value: 1
2653
+ },
2654
+ {
2655
+ label: 'Option 2',
2656
+ value: 2
2657
+ },
2658
+ {
2659
+ label: 'Option 3',
2660
+ value: 3
2661
+ },
2662
+ {
2663
+ label: 'Option 4',
2664
+ value: 4
2665
+ },
2666
+ {
2667
+ label: 'Option 5',
2668
+ value: 5
2669
+ }
2670
+ \]}
2671
+ popoverProps\={{
2672
+ container: {}
2673
+ }}
2674
+ searchable
2675
+ />
2676
+
2677
+ ```
2678
+
2679
+ #### Props
2680
+
2681
+ | Name | Description | Default | Control |
2682
+ | --- | --- | --- | --- |
2683
+ | defaultValue |
2684
+ Value of selected option for uncontrolled filter.
2685
+
2686
+ union
2687
+
2688
+
2689
+
2690
+ | \- | Set object |
2691
+ | inputProps |
2692
+
2693
+ Customise the searchable `IressInput` props for your needs.
2694
+
2695
+ Pick
2696
+
2697
+
2698
+
2699
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } |
2700
+
2701
+ Edit JSON
2702
+
2703
+ inputProps :
2704
+
2705
+ {
2706
+
2707
+ * placeholder : "Search..."
2708
+
2709
+ }
2710
+
2711
+
2712
+
2713
+
2714
+
2715
+
2716
+
2717
+ |
2718
+ | label\* |
2719
+
2720
+ Label to display in the activator button.
2721
+
2722
+ ReactNode
2723
+
2724
+
2725
+
2726
+ | \- |
2727
+
2728
+ "Filter"
2729
+
2730
+ |
2731
+ | limitDesktop |
2732
+
2733
+ |
2734
+
2735
+ 12
2736
+
2737
+ | Set object |
2738
+ | limitMobile |
2739
+
2740
+ |
2741
+
2742
+ 6
2743
+
2744
+ | Set object |
2745
+ | multiSelect |
2746
+
2747
+ Multi-select mode. When `true`, multiple options can be selected.
2748
+
2749
+ boolean
2750
+
2751
+
2752
+
2753
+ | \- | Set boolean |
2754
+ | onChange |
2755
+
2756
+ Emitted when the value changes.
2757
+
2758
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
2759
+
2760
+ | \- | \- |
2761
+ | onReset |
2762
+
2763
+ Emitted when the value is reset.
2764
+
2765
+ () => void
2766
+
2767
+ | \- | \- |
2768
+ | options |
2769
+
2770
+ array
2771
+
2772
+
2773
+
2774
+ | \- |
2775
+
2776
+ Edit JSON
2777
+
2778
+ * options :
2779
+
2780
+ \[
2781
+
2782
+ * 0 :
2783
+
2784
+ {...} 2 keys
2785
+
2786
+ * 1 :
2787
+
2788
+ {...} 2 keys
2789
+
2790
+ * 2 :
2791
+
2792
+ {...} 2 keys
2793
+
2794
+ * 3 :
2795
+
2796
+ {...} 2 keys
2797
+
2798
+ * 4 :
2799
+
2800
+ {...} 2 keys
2801
+
2802
+
2803
+ \]
2804
+
2805
+
2806
+
2807
+
2808
+ |
2809
+ | popoverProps |
2810
+
2811
+ Customise the IressPopover props for your needs.
2812
+
2813
+ FilterPopoverProps
2814
+
2815
+
2816
+
2817
+ | { align: 'bottom-start' } |
2818
+
2819
+ Edit JSON
2820
+
2821
+ popoverProps :
2822
+
2823
+ {
2824
+
2825
+ }
2826
+
2827
+
2828
+
2829
+
2830
+
2831
+
2832
+
2833
+ |
2834
+ | searchable |
2835
+
2836
+ When `true` a search field is shown to search for specific filter option(s).
2837
+
2838
+ boolean
2839
+
2840
+
2841
+
2842
+ | \- | FalseTrue |
2843
+ | searchNoResultsText |
2844
+
2845
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
2846
+
2847
+ ReactNode
2848
+
2849
+
2850
+
2851
+ | \- | Set object |
2852
+ | selectedOptionsText |
2853
+
2854
+ Text displayed next to label when two or more options are selected.
2855
+
2856
+ string
2857
+
2858
+
2859
+
2860
+ | \- | Set string |
2861
+ | value |
2862
+
2863
+ Value of selected option for controlled filter.
2864
+
2865
+ union
2866
+
2867
+
2868
+
2869
+ | \- | Set object |
2870
+ | visibleResetButton |
2871
+
2872
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
2873
+
2874
+ union
2875
+
2876
+
2877
+
2878
+ | \- | Set object |
2879
+
2880
+ ### Searchable
2881
+
2882
+ When an `IressFilter` has 10 or more options, it is recommended that you enable the search functionality. This can be done by adding the `searchable` prop.
2883
+
2884
+ **Note:** When using asynchronous options, the `searchable` prop is automatically set to true.
2885
+
2886
+ [](./iframe.html?id=components-filter--searchable)
2887
+
2888
+ Filter
2889
+
2890
+ None selected
2891
+
2892
+ Hide codedrawOpen in CodeSandbox
2893
+
2894
+ <IressFilter
2895
+ label\="Filter"
2896
+ options\={\[
2897
+ {
2898
+ label: 'Option 1',
2899
+ value: 1
2900
+ },
2901
+ {
2902
+ label: 'Option 2',
2903
+ value: 2
2904
+ },
2905
+ {
2906
+ label: 'Option 3',
2907
+ value: 3
2908
+ },
2909
+ {
2910
+ label: 'Option 4',
2911
+ value: 4
2912
+ },
2913
+ {
2914
+ label: 'Option 5',
2915
+ value: 5
2916
+ }
2917
+ \]}
2918
+ popoverProps\={{
2919
+ container: {}
2920
+ }}
2921
+ searchable
2922
+ />
2923
+
2924
+ ```
2925
+
2926
+ #### Props
2927
+
2928
+ | Name | Description | Default | Control |
2929
+ | --- | --- | --- | --- |
2930
+ | defaultValue |
2931
+ Value of selected option for uncontrolled filter.
2932
+
2933
+ union
2934
+
2935
+
2936
+
2937
+ | \- | Set object |
2938
+ | inputProps |
2939
+
2940
+ Customise the searchable `IressInput` props for your needs.
2941
+
2942
+ Pick
2943
+
2944
+
2945
+
2946
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
2947
+ | label\* |
2948
+
2949
+ Label to display in the activator button.
2950
+
2951
+ ReactNode
2952
+
2953
+
2954
+
2955
+ | \- |
2956
+
2957
+ "Filter"
2958
+
2959
+ |
2960
+ | limitDesktop |
2961
+
2962
+ |
2963
+
2964
+ 12
2965
+
2966
+ | Set object |
2967
+ | limitMobile |
2968
+
2969
+ |
2970
+
2971
+ 6
2972
+
2973
+ | Set object |
2974
+ | multiSelect |
2975
+
2976
+ Multi-select mode. When `true`, multiple options can be selected.
2977
+
2978
+ boolean
2979
+
2980
+
2981
+
2982
+ | \- | Set boolean |
2983
+ | onChange |
2984
+
2985
+ Emitted when the value changes.
2986
+
2987
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
2988
+
2989
+ | \- | \- |
2990
+ | onReset |
2991
+
2992
+ Emitted when the value is reset.
2993
+
2994
+ () => void
2995
+
2996
+ | \- | \- |
2997
+ | options |
2998
+
2999
+ array
3000
+
3001
+
3002
+
3003
+ | \- |
3004
+
3005
+ Edit JSON
3006
+
3007
+ * options :
3008
+
3009
+ \[
3010
+
3011
+ * 0 :
3012
+
3013
+ {...} 2 keys
3014
+
3015
+ * 1 :
3016
+
3017
+ {...} 2 keys
3018
+
3019
+ * 2 :
3020
+
3021
+ {...} 2 keys
3022
+
3023
+ * 3 :
3024
+
3025
+ {...} 2 keys
3026
+
3027
+ * 4 :
3028
+
3029
+ {...} 2 keys
3030
+
3031
+
3032
+ \]
3033
+
3034
+
3035
+
3036
+
3037
+ |
3038
+ | popoverProps |
3039
+
3040
+ Customise the IressPopover props for your needs.
3041
+
3042
+ FilterPopoverProps
3043
+
3044
+
3045
+
3046
+ | { align: 'bottom-start' } |
3047
+
3048
+ Edit JSON
3049
+
3050
+ popoverProps :
3051
+
3052
+ {
3053
+
3054
+ }
3055
+
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+ |
3063
+ | searchable |
3064
+
3065
+ When `true` a search field is shown to search for specific filter option(s).
3066
+
3067
+ boolean
3068
+
3069
+
3070
+
3071
+ | \- | FalseTrue |
3072
+ | searchNoResultsText |
3073
+
3074
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
3075
+
3076
+ ReactNode
3077
+
3078
+
3079
+
3080
+ | \- | Set object |
3081
+ | selectedOptionsText |
3082
+
3083
+ Text displayed next to label when two or more options are selected.
3084
+
3085
+ string
3086
+
3087
+
3088
+
3089
+ | \- | Set string |
3090
+ | value |
3091
+
3092
+ Value of selected option for controlled filter.
3093
+
3094
+ union
3095
+
3096
+
3097
+
3098
+ | \- | Set object |
3099
+ | visibleResetButton |
3100
+
3101
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
3102
+
3103
+ union
3104
+
3105
+
3106
+
3107
+ | \- | Set object |
3108
+
3109
+ ### Reset filters
3110
+
3111
+ Adding the `visibleResetButton` prop adds a way for the user a way to easily reset their choices. This works for single and multiple selection filters.
3112
+
3113
+ Below are examples of both single selects and multi selects with `visibleResetButton` enabled.
3114
+
3115
+ [](./iframe.html?id=components-filter--reset-filters)
3116
+
3117
+ Filter
3118
+
3119
+ None selected
3120
+
3121
+ Hide codedrawOpen in CodeSandbox
3122
+
3123
+ <IressFilter
3124
+ label\="Filter"
3125
+ options\={\[
3126
+ {
3127
+ label: 'Option 1',
3128
+ value: 1
3129
+ },
3130
+ {
3131
+ label: 'Option 2',
3132
+ value: 2
3133
+ },
3134
+ {
3135
+ label: 'Option 3',
3136
+ value: 3
3137
+ },
3138
+ {
3139
+ label: 'Option 4',
3140
+ value: 4
3141
+ },
3142
+ {
3143
+ label: 'Option 5',
3144
+ value: 5
3145
+ }
3146
+ \]}
3147
+ popoverProps\={{
3148
+ container: {}
3149
+ }}
3150
+ visibleResetButton
3151
+ />
3152
+
3153
+ ```
3154
+
3155
+ #### Props
3156
+
3157
+ | Name | Description | Default | Control |
3158
+ | --- | --- | --- | --- |
3159
+ | defaultValue |
3160
+ Value of selected option for uncontrolled filter.
3161
+
3162
+ union
3163
+
3164
+
3165
+
3166
+ | \- | Set object |
3167
+ | inputProps |
3168
+
3169
+ Customise the searchable `IressInput` props for your needs.
3170
+
3171
+ Pick
3172
+
3173
+
3174
+
3175
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
3176
+ | label\* |
3177
+
3178
+ Label to display in the activator button.
3179
+
3180
+ ReactNode
3181
+
3182
+
3183
+
3184
+ | \- |
3185
+
3186
+ "Filter"
3187
+
3188
+ |
3189
+ | limitDesktop |
3190
+
3191
+ |
3192
+
3193
+ 12
3194
+
3195
+ | Set object |
3196
+ | limitMobile |
3197
+
3198
+ |
3199
+
3200
+ 6
3201
+
3202
+ | Set object |
3203
+ | multiSelect |
3204
+
3205
+ Multi-select mode. When `true`, multiple options can be selected.
3206
+
3207
+ boolean
3208
+
3209
+
3210
+
3211
+ | \- | Set boolean |
3212
+ | onChange |
3213
+
3214
+ Emitted when the value changes.
3215
+
3216
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
3217
+
3218
+ | \- | \- |
3219
+ | onReset |
3220
+
3221
+ Emitted when the value is reset.
3222
+
3223
+ () => void
3224
+
3225
+ | \- | \- |
3226
+ | options |
3227
+
3228
+ array
3229
+
3230
+
3231
+
3232
+ | \- |
3233
+
3234
+ Edit JSON
3235
+
3236
+ * options :
3237
+
3238
+ \[
3239
+
3240
+ * 0 :
3241
+
3242
+ {...} 2 keys
3243
+
3244
+ * 1 :
3245
+
3246
+ {...} 2 keys
3247
+
3248
+ * 2 :
3249
+
3250
+ {...} 2 keys
3251
+
3252
+ * 3 :
3253
+
3254
+ {...} 2 keys
3255
+
3256
+ * 4 :
3257
+
3258
+ {...} 2 keys
3259
+
3260
+
3261
+ \]
3262
+
3263
+
3264
+
3265
+
3266
+ |
3267
+ | popoverProps |
3268
+
3269
+ Customise the IressPopover props for your needs.
3270
+
3271
+ FilterPopoverProps
3272
+
3273
+
3274
+
3275
+ | { align: 'bottom-start' } |
3276
+
3277
+ Edit JSON
3278
+
3279
+ popoverProps :
3280
+
3281
+ {
3282
+
3283
+ }
3284
+
3285
+
3286
+
3287
+
3288
+
3289
+
3290
+
3291
+ |
3292
+ | searchable |
3293
+
3294
+ When `true` a search field is shown to search for specific filter option(s).
3295
+
3296
+ boolean
3297
+
3298
+
3299
+
3300
+ | \- | Set boolean |
3301
+ | searchNoResultsText |
3302
+
3303
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
3304
+
3305
+ ReactNode
3306
+
3307
+
3308
+
3309
+ | \- | Set object |
3310
+ | selectedOptionsText |
3311
+
3312
+ Text displayed next to label when two or more options are selected.
3313
+
3314
+ string
3315
+
3316
+
3317
+
3318
+ | \- | Set string |
3319
+ | value |
3320
+
3321
+ Value of selected option for controlled filter.
3322
+
3323
+ union
3324
+
3325
+
3326
+
3327
+ | \- | Set object |
3328
+ | visibleResetButton |
3329
+
3330
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
3331
+
3332
+ union
3333
+
3334
+
3335
+
3336
+ | \- |
3337
+
3338
+ true
3339
+
3340
+ |
3341
+
3342
+ ### No results
3343
+
3344
+ If you would like to show a message when there are no results, you can use the `searchNoResultsText` prop. It accepts any React node.
3345
+
3346
+ [](./iframe.html?id=components-filter--no-results-text)
3347
+
3348
+ Filter
3349
+
3350
+ None selected
3351
+
3352
+ Hide codedrawOpen in CodeSandbox
3353
+
3354
+ <IressFilter
3355
+ inputProps\={{
3356
+ placeholder: 'Type "no" to see the no results text'
3357
+ }}
3358
+ label\="Filter"
3359
+ options\={\[
3360
+ {
3361
+ label: 'Option 1',
3362
+ value: 1
3363
+ },
3364
+ {
3365
+ label: 'Option 2',
3366
+ value: 2
3367
+ },
3368
+ {
3369
+ label: 'Option 3',
3370
+ value: 3
3371
+ },
3372
+ {
3373
+ label: 'Option 4',
3374
+ value: 4
3375
+ },
3376
+ {
3377
+ label: 'Option 5',
3378
+ value: 5
3379
+ }
3380
+ \]}
3381
+ popoverProps\={{
3382
+ container: {}
3383
+ }}
3384
+ searchNoResultsText\={<IressPanel className\="iress-u-text"\>No results found</IressPanel\>}
3385
+ searchable
3386
+ />
3387
+
3388
+ ```
3389
+
3390
+ #### Props
3391
+
3392
+ | Name | Description | Default | Control |
3393
+ | --- | --- | --- | --- |
3394
+ | defaultValue |
3395
+ Value of selected option for uncontrolled filter.
3396
+
3397
+ union
3398
+
3399
+
3400
+
3401
+ | \- | Set object |
3402
+ | inputProps |
3403
+
3404
+ Customise the searchable `IressInput` props for your needs.
3405
+
3406
+ Pick
3407
+
3408
+
3409
+
3410
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } |
3411
+
3412
+ Edit JSON
3413
+
3414
+ inputProps :
3415
+
3416
+ {
3417
+
3418
+ * placeholder : "Type "no" to see the no results text"
3419
+
3420
+ }
3421
+
3422
+
3423
+
3424
+
3425
+
3426
+
3427
+
3428
+ |
3429
+ | label\* |
3430
+
3431
+ Label to display in the activator button.
3432
+
3433
+ ReactNode
3434
+
3435
+
3436
+
3437
+ | \- |
3438
+
3439
+ "Filter"
3440
+
3441
+ |
3442
+ | limitDesktop |
3443
+
3444
+ |
3445
+
3446
+ 12
3447
+
3448
+ | Set object |
3449
+ | limitMobile |
3450
+
3451
+ |
3452
+
3453
+ 6
3454
+
3455
+ | Set object |
3456
+ | multiSelect |
3457
+
3458
+ Multi-select mode. When `true`, multiple options can be selected.
3459
+
3460
+ boolean
3461
+
3462
+
3463
+
3464
+ | \- | Set boolean |
3465
+ | onChange |
3466
+
3467
+ Emitted when the value changes.
3468
+
3469
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
3470
+
3471
+ | \- | \- |
3472
+ | onReset |
3473
+
3474
+ Emitted when the value is reset.
3475
+
3476
+ () => void
3477
+
3478
+ | \- | \- |
3479
+ | options |
3480
+
3481
+ array
3482
+
3483
+
3484
+
3485
+ | \- |
3486
+
3487
+ Edit JSON
3488
+
3489
+ * options :
3490
+
3491
+ \[
3492
+
3493
+ * 0 :
3494
+
3495
+ {...} 2 keys
3496
+
3497
+ * 1 :
3498
+
3499
+ {...} 2 keys
3500
+
3501
+ * 2 :
3502
+
3503
+ {...} 2 keys
3504
+
3505
+ * 3 :
3506
+
3507
+ {...} 2 keys
3508
+
3509
+ * 4 :
3510
+
3511
+ {...} 2 keys
3512
+
3513
+
3514
+ \]
3515
+
3516
+
3517
+
3518
+
3519
+ |
3520
+ | popoverProps |
3521
+
3522
+ Customise the IressPopover props for your needs.
3523
+
3524
+ FilterPopoverProps
3525
+
3526
+
3527
+
3528
+ | { align: 'bottom-start' } |
3529
+
3530
+ Edit JSON
3531
+
3532
+ popoverProps :
3533
+
3534
+ {
3535
+
3536
+ }
3537
+
3538
+
3539
+
3540
+
3541
+
3542
+
3543
+
3544
+ |
3545
+ | searchable |
3546
+
3547
+ When `true` a search field is shown to search for specific filter option(s).
3548
+
3549
+ boolean
3550
+
3551
+
3552
+
3553
+ | \- | FalseTrue |
3554
+ | searchNoResultsText |
3555
+
3556
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
3557
+
3558
+ ReactNode
3559
+
3560
+
3561
+
3562
+ | \- |
3563
+
3564
+ Edit JSON
3565
+
3566
+ searchNoResultsText :
3567
+
3568
+ {
3569
+
3570
+ * $$typeof : Symbol(react.transitional.element)
3571
+ * type : ({ children, background = "default", noBorderRadius, noGutter, padding = "md", stretch, textAlign = "inherit", className, ...restProps }) => { const classMap = { \[PanelCssClass.Stretch\]: stretch, \[PanelCssClass.NoBorderRadius\]: noBorderRadius, \[PanelCssClass.NoGutter\]: noGutter }; const cssClasses = classNames( className, PanelCssClass.Base, \`${GlobalCSSClass.TextAlignBase}--${textAlign}\`, \`${PanelCssClass.Background}--${background}\`, getResponsivePaddingClasses(padding), classMap ); return /\* @\_\_PURE\_\_ \*/ jsxDEV("div", { className: cssClasses, ...restProps, children }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Panel/Panel.tsx", lineNumber: 38, columnNumber: 5 }, this); }
3572
+ * key : null
3573
+ * props :
3574
+
3575
+ {...} 2 keys
3576
+
3577
+ * \_owner : null
3578
+ * \_store :
3579
+
3580
+ {...} 0 keys
3581
+
3582
+
3583
+ }
3584
+
3585
+
3586
+
3587
+
3588
+
3589
+
3590
+
3591
+ |
3592
+ | selectedOptionsText |
3593
+
3594
+ Text displayed next to label when two or more options are selected.
3595
+
3596
+ string
3597
+
3598
+
3599
+
3600
+ | \- | Set string |
3601
+ | value |
3602
+
3603
+ Value of selected option for controlled filter.
3604
+
3605
+ union
3606
+
3607
+
3608
+
3609
+ | \- | Set object |
3610
+ | visibleResetButton |
3611
+
3612
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
3613
+
3614
+ union
3615
+
3616
+
3617
+
3618
+ | \- | Set object |
3619
+
3620
+ ### Popover props
3621
+
3622
+ Under the hood, filter uses `IressPopover` to display the filter options. You can customise this with `popoverProps`. It accepts `align`, `className`, `container` and `displayMode`.
3623
+
3624
+ There are two additional props that filter accepts to customise the popover: `append` and `prepend`. You can place additional content above or below the results using these props.
3625
+
3626
+ [](./iframe.html?id=components-filter--popover-props)
3627
+
3628
+ Filter
3629
+
3630
+ None selected
3631
+
3632
+ Hide codedrawOpen in CodeSandbox
3633
+
3634
+ <IressFilter
3635
+ label\="Filter"
3636
+ options\={\[
3637
+ {
3638
+ label: 'Option 1',
3639
+ value: 1
3640
+ },
3641
+ {
3642
+ label: 'Option 2',
3643
+ value: 2
3644
+ },
3645
+ {
3646
+ label: 'Option 3',
3647
+ value: 3
3648
+ },
3649
+ {
3650
+ label: 'Option 4',
3651
+ value: 4
3652
+ },
3653
+ {
3654
+ label: 'Option 5',
3655
+ value: 5
3656
+ }
3657
+ \]}
3658
+ popoverProps\={{
3659
+ append: <IressPanel\><IressButton\>Add an option</IressButton\></IressPanel\>,
3660
+ container: {}
3661
+ }}
3662
+ />
3663
+
3664
+ ```
3665
+
3666
+ #### Props
3667
+
3668
+ | Name | Description | Default | Control |
3669
+ | --- | --- | --- | --- |
3670
+ | defaultValue |
3671
+ Value of selected option for uncontrolled filter.
3672
+
3673
+ union
3674
+
3675
+
3676
+
3677
+ | \- | Set object |
3678
+ | inputProps |
3679
+
3680
+ Customise the searchable `IressInput` props for your needs.
3681
+
3682
+ Pick
3683
+
3684
+
3685
+
3686
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
3687
+ | label\* |
3688
+
3689
+ Label to display in the activator button.
3690
+
3691
+ ReactNode
3692
+
3693
+
3694
+
3695
+ | \- |
3696
+
3697
+ "Filter"
3698
+
3699
+ |
3700
+ | limitDesktop |
3701
+
3702
+ |
3703
+
3704
+ 12
3705
+
3706
+ | Set object |
3707
+ | limitMobile |
3708
+
3709
+ |
3710
+
3711
+ 6
3712
+
3713
+ | Set object |
3714
+ | multiSelect |
3715
+
3716
+ Multi-select mode. When `true`, multiple options can be selected.
3717
+
3718
+ boolean
3719
+
3720
+
3721
+
3722
+ | \- | Set boolean |
3723
+ | onChange |
3724
+
3725
+ Emitted when the value changes.
3726
+
3727
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
3728
+
3729
+ | \- | \- |
3730
+ | onReset |
3731
+
3732
+ Emitted when the value is reset.
3733
+
3734
+ () => void
3735
+
3736
+ | \- | \- |
3737
+ | options |
3738
+
3739
+ array
3740
+
3741
+
3742
+
3743
+ | \- |
3744
+
3745
+ Edit JSON
3746
+
3747
+ * options :
3748
+
3749
+ \[
3750
+
3751
+ * 0 :
3752
+
3753
+ {...} 2 keys
3754
+
3755
+ * 1 :
3756
+
3757
+ {...} 2 keys
3758
+
3759
+ * 2 :
3760
+
3761
+ {...} 2 keys
3762
+
3763
+ * 3 :
3764
+
3765
+ {...} 2 keys
3766
+
3767
+ * 4 :
3768
+
3769
+ {...} 2 keys
3770
+
3771
+
3772
+ \]
3773
+
3774
+
3775
+
3776
+
3777
+ |
3778
+ | popoverProps |
3779
+
3780
+ Customise the IressPopover props for your needs.
3781
+
3782
+ FilterPopoverProps
3783
+
3784
+
3785
+
3786
+ | { align: 'bottom-start' } |
3787
+
3788
+ Edit JSON
3789
+
3790
+ popoverProps :
3791
+
3792
+ {
3793
+
3794
+ * append :
3795
+
3796
+ {...} 6 keys
3797
+
3798
+
3799
+ }
3800
+
3801
+
3802
+
3803
+
3804
+
3805
+
3806
+
3807
+ |
3808
+ | searchable |
3809
+
3810
+ When `true` a search field is shown to search for specific filter option(s).
3811
+
3812
+ boolean
3813
+
3814
+
3815
+
3816
+ | \- | Set boolean |
3817
+ | searchNoResultsText |
3818
+
3819
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
3820
+
3821
+ ReactNode
3822
+
3823
+
3824
+
3825
+ | \- | Set object |
3826
+ | selectedOptionsText |
3827
+
3828
+ Text displayed next to label when two or more options are selected.
3829
+
3830
+ string
3831
+
3832
+
3833
+
3834
+ | \- | Set string |
3835
+ | value |
3836
+
3837
+ Value of selected option for controlled filter.
3838
+
3839
+ union
3840
+
3841
+
3842
+
3843
+ | \- | Set object |
3844
+ | visibleResetButton |
3845
+
3846
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
3847
+
3848
+ union
3849
+
3850
+
3851
+
3852
+ | \- | Set object |
3853
+
3854
+ ### Selected options text
3855
+
3856
+ In `multiSelect` mode, the selections options are displayed using the `selectedOptionsText` prop. You can customise this text to suit your needs. It will replace `{{numOptions}}` with the number of selected options.
3857
+
3858
+ [](./iframe.html?id=components-filter--selected-options-text)
3859
+
3860
+ Filter
3861
+
3862
+ None selected
3863
+
3864
+ Hide codedrawOpen in CodeSandbox
3865
+
3866
+ <IressFilter
3867
+ label\="Filter"
3868
+ multiSelect
3869
+ options\={\[
3870
+ {
3871
+ label: 'Option 1',
3872
+ value: 1
3873
+ },
3874
+ {
3875
+ label: 'Option 2',
3876
+ value: 2
3877
+ },
3878
+ {
3879
+ label: 'Option 3',
3880
+ value: 3
3881
+ },
3882
+ {
3883
+ label: 'Option 4',
3884
+ value: 4
3885
+ },
3886
+ {
3887
+ label: 'Option 5',
3888
+ value: 5
3889
+ }
3890
+ \]}
3891
+ popoverProps\={{
3892
+ container: {}
3893
+ }}
3894
+ selectedOptionsText\="{{numOptions}} activated"
3895
+ />
3896
+
3897
+ ```
3898
+
3899
+ #### Props
3900
+
3901
+ | Name | Description | Default | Control |
3902
+ | --- | --- | --- | --- |
3903
+ | defaultValue |
3904
+ Value of selected option for uncontrolled filter.
3905
+
3906
+ union
3907
+
3908
+
3909
+
3910
+ | \- | Set object |
3911
+ | inputProps |
3912
+
3913
+ Customise the searchable `IressInput` props for your needs.
3914
+
3915
+ Pick
3916
+
3917
+
3918
+
3919
+ | { clearable: true, prepend: <IressIcon name="search" />, watermark: true, } | Set object |
3920
+ | label\* |
3921
+
3922
+ Label to display in the activator button.
3923
+
3924
+ ReactNode
3925
+
3926
+
3927
+
3928
+ | \- |
3929
+
3930
+ "Filter"
3931
+
3932
+ |
3933
+ | limitDesktop |
3934
+
3935
+ |
3936
+
3937
+ 12
3938
+
3939
+ | Set object |
3940
+ | limitMobile |
3941
+
3942
+ |
3943
+
3944
+ 6
3945
+
3946
+ | Set object |
3947
+ | multiSelect |
3948
+
3949
+ Multi-select mode. When `true`, multiple options can be selected.
3950
+
3951
+ boolean
3952
+
3953
+
3954
+
3955
+ | \- | FalseTrue |
3956
+ | onChange |
3957
+
3958
+ Emitted when the value changes.
3959
+
3960
+ (selected?: LabelValueMeta | LabelValueMeta\[\]) => void
3961
+
3962
+ | \- | \- |
3963
+ | onReset |
3964
+
3965
+ Emitted when the value is reset.
3966
+
3967
+ () => void
3968
+
3969
+ | \- | \- |
3970
+ | options |
3971
+
3972
+ array
3973
+
3974
+
3975
+
3976
+ | \- |
3977
+
3978
+ Edit JSON
3979
+
3980
+ * options :
3981
+
3982
+ \[
3983
+
3984
+ * 0 :
3985
+
3986
+ {...} 2 keys
3987
+
3988
+ * 1 :
3989
+
3990
+ {...} 2 keys
3991
+
3992
+ * 2 :
3993
+
3994
+ {...} 2 keys
3995
+
3996
+ * 3 :
3997
+
3998
+ {...} 2 keys
3999
+
4000
+ * 4 :
4001
+
4002
+ {...} 2 keys
4003
+
4004
+
4005
+ \]
4006
+
4007
+
4008
+
4009
+
4010
+ |
4011
+ | popoverProps |
4012
+
4013
+ Customise the IressPopover props for your needs.
4014
+
4015
+ FilterPopoverProps
4016
+
4017
+
4018
+
4019
+ | { align: 'bottom-start' } |
4020
+
4021
+ Edit JSON
4022
+
4023
+ popoverProps :
4024
+
4025
+ {
4026
+
4027
+ }
4028
+
4029
+
4030
+
4031
+
4032
+
4033
+
4034
+
4035
+ |
4036
+ | searchable |
4037
+
4038
+ When `true` a search field is shown to search for specific filter option(s).
4039
+
4040
+ boolean
4041
+
4042
+
4043
+
4044
+ | \- | Set boolean |
4045
+ | searchNoResultsText |
4046
+
4047
+ Text to be displayed when no results are found from search. Ignored when `searchable` is `false`
4048
+
4049
+ ReactNode
4050
+
4051
+
4052
+
4053
+ | \- | Set object |
4054
+ | selectedOptionsText |
4055
+
4056
+ Text displayed next to label when two or more options are selected.
4057
+
4058
+ string
4059
+
4060
+
4061
+
4062
+ | \- | {{numOptions}} activated |
4063
+ | value |
4064
+
4065
+ Value of selected option for controlled filter.
4066
+
4067
+ union
4068
+
4069
+
4070
+
4071
+ | \- | Set object |
4072
+ | visibleResetButton |
4073
+
4074
+ When `true`, a reset button will be shown above the options. If provided a string, it will be used as the reset button label.
4075
+
4076
+ union
4077
+
4078
+
4079
+
4080
+ | \- | Set object |