@@ -12,14 +12,14 @@ export function SingleSelectA11yField(props) {
12
12
disabled,
13
13
error,
14
14
helpText,
15
- idPrefix,
16
15
label,
16
+ name,
17
17
required,
18
18
valid,
19
19
validationText,
20
20
warning,
21
21
} = props
22
- const labelId = `${ idPrefix } -label`
22
+ const labelId = `${ name } -label`
23
23
24
24
return (
25
25
< Field
@@ -41,12 +41,12 @@ export function SingleSelectA11yField(props) {
41
41
}
42
42
43
43
SingleSelectA11yField . propTypes = {
44
- /** necessary for IDs that are required for accessibility **/
45
- idPrefix : PropTypes . string . isRequired ,
46
-
47
44
/** Label displayed above the input **/
48
45
label : PropTypes . string . isRequired ,
49
46
47
+ /** necessary for IDs that are required for accessibility **/
48
+ name : PropTypes . string . isRequired ,
49
+
50
50
/** An array of options **/
51
51
options : PropTypes . arrayOf ( optionProp ) . isRequired ,
52
52
@@ -65,10 +65,6 @@ SingleSelectA11yField.propTypes = {
65
65
/** Whether a clear button should be displayed or not **/
66
66
clearable : PropTypes . bool ,
67
67
68
- /** Allows to override what's rendered inside the `button[role="option"]`.
69
- * Can be overriden on an individual option basis **/
70
- customOption : PropTypes . elementType ,
71
-
72
68
/** A value for a `data-test` attribute on the root element **/
73
69
dataTest : PropTypes . string ,
74
70
@@ -114,6 +110,10 @@ SingleSelectA11yField.propTypes = {
114
110
/** String that will be displayed when the select is being filtered but the options array is empty **/
115
111
noMatchText : requiredIf ( ( props ) => props . filterable , PropTypes . string ) ,
116
112
113
+ /** Allows to override what's rendered inside the `button[role="option"]`.
114
+ * Can be overriden on an individual option basis **/
115
+ optionComponent : PropTypes . elementType ,
116
+
117
117
/** For a11y: How aggressively the user should be updated about changes in options **/
118
118
optionUpdateStrategy : PropTypes . oneOf ( [ 'off' , 'polite' , 'assertive' ] ) ,
119
119
0 commit comments