@iress-oss/ids-mcp-server 6.0.0-alpha.1-canary-20251204032753-fe18cab → 6.0.0-alpha.1-canary-20251204040305-3639454

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