You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1858,18 +1860,18 @@ import { SingleSelectA11y } from '@dhis2/ui'
1858
1860
|---|---|---|---|---|
1859
1861
|idPrefix|string||*|necessary for IDs that are required for accessibility *|
1860
1862
|options|arrayOf(custom)||*|An array of options *|
1861
-
|value|string|`''`||As of now, this component does not support being uncontrolled *|
1862
1863
|onChange|function||*|A callback that will be called with the new value or an empty string *|
1863
1864
|autoFocus|boolean|`false`||Will focus the select initially *|
1864
1865
|className|string|`''`||Additional class names that will be applied to the root element *|
1865
1866
|clearText|custom|`''`||This will allow us to put an aria-label on the clear button *|
1866
1867
|clearable|boolean|`false`||Whether a clear button should be displayed or not *|
1867
-
|customOption|elementType|||Allows to override what's rendered inside the `button[role="option"]`.<br/>Can be overriden on an individual option basis *|
1868
+
|customOption|elementType|`undefined`||Allows to override what's rendered inside the `button[role="option"]`.<br/>Can be overriden on an individual option basis *|
1868
1869
|dataTest|string|`'dhis2-singleselecta11y'`||A value for a `data-test` attribute on the root element *|
1869
1870
|dense|boolean|`false`||Renders a select with lower height *|
1870
1871
|disabled|boolean|`false`||Disables all interactions with the select (except focussing) *|
1871
1872
|empty|node|`false`||Text or component to display when there are no options *|
1872
1873
|error|custom|`false`||Applies 'error' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
1874
+
|filterHelpText|string|`''`||Help text that will be displayed below the input *|
1873
1875
|filterLabel|string|`''`||Value will be used as aria-label attribute on the filter input *|
1874
1876
|filterPlaceholder|string|`''`||Placeholder for the filter input *|
1875
1877
|filterValue|string|`''`||Value of the filter input *|
@@ -1884,9 +1886,11 @@ import { SingleSelectA11y } from '@dhis2/ui'
1884
1886
|prefix|string|`''`||String that will be displayed before the label of the selected option *|
1885
1887
|tabIndex|string │ number|`'0'`||Standard HTML tab-index attribute that will be put on the combobox's root element *|
1886
1888
|valid|custom|`false`||Applies 'valid' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
1889
+
|value|string|`''`||As of now, this component does not support being uncontrolled *|
1887
1890
|valueLabel|custom|`''`||When the option is not in the options list (e.g. not loaded or list is<br/>filtered), but a selected value needs to be displayed, then this prop can<br/>be used to supply the text to be shown.|
1888
1891
|warning|custom|`false`||Applies 'warning' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
1889
1892
|onBlur|function|`() => undefined`||Will be called when the combobox is loses focus *|
1893
+
|onEndReached|function|||Will be called when the last option is scrolled into the visible area *|
1890
1894
|onFilterChange|function|`() => undefined`||Will be called when the filter value changes *|
1891
1895
|onFocus|function|`() => undefined`||Will be called when the combobox is being focused *|
1892
1896
@@ -2004,7 +2008,10 @@ import { Menu } from '@dhis2/ui'
Copy file name to clipboardExpand all lines: components/select/API.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,18 +177,18 @@ import { SingleSelectA11y } from '@dhis2/ui'
177
177
|---|---|---|---|---|
178
178
|idPrefix|string||*|necessary for IDs that are required for accessibility *|
179
179
|options|arrayOf(custom)||*|An array of options *|
180
-
|value|string|`''`||As of now, this component does not support being uncontrolled *|
181
180
|onChange|function||*|A callback that will be called with the new value or an empty string *|
182
181
|autoFocus|boolean|`false`||Will focus the select initially *|
183
182
|className|string|`''`||Additional class names that will be applied to the root element *|
184
183
|clearText|custom(function)|`''`||This will allow us to put an aria-label on the clear button *|
185
184
|clearable|boolean|`false`||Whether a clear button should be displayed or not *|
186
-
|customOption|elementType|||Allows to override what's rendered inside the `button[role="option"]`.<br/>Can be overriden on an individual option basis *|
185
+
|customOption|elementType|`undefined`||Allows to override what's rendered inside the `button[role="option"]`.<br/>Can be overriden on an individual option basis *|
187
186
|dataTest|string|`'dhis2-singleselecta11y'`||A value for a `data-test` attribute on the root element *|
188
187
|dense|boolean|`false`||Renders a select with lower height *|
189
188
|disabled|boolean|`false`||Disables all interactions with the select (except focussing) *|
190
189
|empty|node|`false`||Text or component to display when there are no options *|
191
190
|error|custom|`false`||Applies 'error' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
191
+
|filterHelpText|string|`''`||Help text that will be displayed below the input *|
192
192
|filterLabel|string|`''`||Value will be used as aria-label attribute on the filter input *|
193
193
|filterPlaceholder|string|`''`||Placeholder for the filter input *|
194
194
|filterValue|string|`''`||Value of the filter input *|
@@ -203,9 +203,11 @@ import { SingleSelectA11y } from '@dhis2/ui'
203
203
|prefix|string|`''`||String that will be displayed before the label of the selected option *|
204
204
|tabIndex|string │ number|`'0'`||Standard HTML tab-index attribute that will be put on the combobox's root element *|
205
205
|valid|custom|`false`||Applies 'valid' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
206
+
|value|string|`''`||As of now, this component does not support being uncontrolled *|
206
207
|valueLabel|custom(function)|`''`||When the option is not in the options list (e.g. not loaded or list is<br/>filtered), but a selected value needs to be displayed, then this prop can<br/>be used to supply the text to be shown.|
207
208
|warning|custom|`false`||Applies 'warning' appearance for validation feedback. Mutually exclusive with `warning` and `valid` props *|
208
209
|onBlur|function|`() => undefined`||Will be called when the combobox is loses focus *|
210
+
|onEndReached|function|||Will be called when the last option is scrolled into the visible area *|
209
211
|onFilterChange|function|`() => undefined`||Will be called when the filter value changes *|
210
212
|onFocus|function|`() => undefined`||Will be called when the combobox is being focused *|
0 commit comments