@dhis2-ui/select 10.10.1 → 10.11.0
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.
- package/package.json +15 -15
- package/types/index.d.ts +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/select",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.11.0",
|
|
4
4
|
"description": "UI Select",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"styled-jsx": "^4"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dhis2-ui/box": "10.
|
|
37
|
-
"@dhis2-ui/button": "10.
|
|
38
|
-
"@dhis2-ui/card": "10.
|
|
39
|
-
"@dhis2-ui/checkbox": "10.
|
|
40
|
-
"@dhis2-ui/chip": "10.
|
|
41
|
-
"@dhis2-ui/field": "10.
|
|
42
|
-
"@dhis2-ui/input": "10.
|
|
43
|
-
"@dhis2-ui/layer": "10.
|
|
44
|
-
"@dhis2-ui/loader": "10.
|
|
45
|
-
"@dhis2-ui/popper": "10.
|
|
46
|
-
"@dhis2-ui/status-icon": "10.
|
|
47
|
-
"@dhis2-ui/tooltip": "10.
|
|
36
|
+
"@dhis2-ui/box": "10.11.0",
|
|
37
|
+
"@dhis2-ui/button": "10.11.0",
|
|
38
|
+
"@dhis2-ui/card": "10.11.0",
|
|
39
|
+
"@dhis2-ui/checkbox": "10.11.0",
|
|
40
|
+
"@dhis2-ui/chip": "10.11.0",
|
|
41
|
+
"@dhis2-ui/field": "10.11.0",
|
|
42
|
+
"@dhis2-ui/input": "10.11.0",
|
|
43
|
+
"@dhis2-ui/layer": "10.11.0",
|
|
44
|
+
"@dhis2-ui/loader": "10.11.0",
|
|
45
|
+
"@dhis2-ui/popper": "10.11.0",
|
|
46
|
+
"@dhis2-ui/status-icon": "10.11.0",
|
|
47
|
+
"@dhis2-ui/tooltip": "10.11.0",
|
|
48
48
|
"@dhis2/prop-types": "^3.1.2",
|
|
49
|
-
"@dhis2/ui-constants": "10.
|
|
50
|
-
"@dhis2/ui-icons": "10.
|
|
49
|
+
"@dhis2/ui-constants": "10.11.0",
|
|
50
|
+
"@dhis2/ui-icons": "10.11.0",
|
|
51
51
|
"classnames": "^2.3.1",
|
|
52
52
|
"prop-types": "^15.7.2"
|
|
53
53
|
},
|
package/types/index.d.ts
CHANGED
|
@@ -323,7 +323,7 @@ type SimpleSingleSelectCustomOptionProp = (props: {
|
|
|
323
323
|
|
|
324
324
|
export interface SimpleSingleSelectProps {
|
|
325
325
|
/** necessary for IDs that are required for accessibility **/
|
|
326
|
-
name: string
|
|
326
|
+
name: string
|
|
327
327
|
|
|
328
328
|
/** An array of options **/
|
|
329
329
|
options: Array<{
|
|
@@ -350,7 +350,7 @@ export interface SimpleSingleSelectProps {
|
|
|
350
350
|
|
|
351
351
|
/** Allows to override what's rendered inside the `button[role="option"]`.
|
|
352
352
|
* Can be overriden on an individual option basis **/
|
|
353
|
-
|
|
353
|
+
optionComponent?: SimpleSingleSelectCustomOptionProp
|
|
354
354
|
|
|
355
355
|
/** A value for a `data-test` attribute on the root element **/
|
|
356
356
|
dataTest?: string
|
|
@@ -382,6 +382,11 @@ export interface SimpleSingleSelectProps {
|
|
|
382
382
|
/** Whether the select should display a filter input **/
|
|
383
383
|
filterable?: boolean
|
|
384
384
|
|
|
385
|
+
/**
|
|
386
|
+
* Constrains the height of the input
|
|
387
|
+
*/
|
|
388
|
+
inputMaxHeight?: string | number
|
|
389
|
+
|
|
385
390
|
/** Should contain the id of the element that labels the select, if applicable **/
|
|
386
391
|
labelledBy?: string
|
|
387
392
|
|
|
@@ -391,7 +396,7 @@ export interface SimpleSingleSelectProps {
|
|
|
391
396
|
/** Text that will be displayed next to the loading indicator **/
|
|
392
397
|
menuLoadingText?: string
|
|
393
398
|
|
|
394
|
-
/** Allows to modify the max height of the menu **/
|
|
399
|
+
/** Allows to modify the max height of the menu - Default is 288px **/
|
|
395
400
|
menuMaxHeight?: string
|
|
396
401
|
|
|
397
402
|
/** String that will be displayed when the select is being filtered but the options array is empty **/
|
|
@@ -412,8 +417,10 @@ export interface SimpleSingleSelectProps {
|
|
|
412
417
|
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props **/
|
|
413
418
|
valid?: boolean
|
|
414
419
|
|
|
415
|
-
|
|
416
|
-
|
|
420
|
+
selected?: {
|
|
421
|
+
label: string
|
|
422
|
+
value: string
|
|
423
|
+
}
|
|
417
424
|
|
|
418
425
|
/**
|
|
419
426
|
* When the option is not in the options list (e.g. not loaded or list is
|
|
@@ -428,6 +435,9 @@ export interface SimpleSingleSelectProps {
|
|
|
428
435
|
/** Will be called when the combobox is loses focus **/
|
|
429
436
|
onBlur?: (e: React.FocusEvent<HTMLElement>) => void
|
|
430
437
|
|
|
438
|
+
/** Will be called when the combobox is loses focus **/
|
|
439
|
+
onClear?: () => void
|
|
440
|
+
|
|
431
441
|
/** Will be called when the last option is scrolled into the visible area **/
|
|
432
442
|
onEndReached?: () => void
|
|
433
443
|
|