@@ -12,59 +12,71 @@ Change event Handler that is called when the value is changed.
12
12
13
13
### onSelect?{ type: 'Function(Any value)' }
14
14
15
- This handler fires when an item has been selected from the list. It fires before the ` onChange ` handler, and fires
15
+ This handler fires when an item has been selected from the list. It fires before the ` onChange ` handler, and fires
16
16
regardless of whether the value has actually changed.
17
17
18
18
<EditableExample codeText={require('../examples/onSelect')(widgetName)}/>
19
19
20
20
### data?{ type: 'Array<Any >' }
21
21
22
- provide an array of possible values for the DropdownList . If an array of ` objects ` is provided you
22
+ provide an array of possible values for the ${widgetName} . If an array of ` objects ` is provided you
23
23
should use the ` valueField ` and ` textField ` props, to specify which object
24
24
properties comprise the value field (such as an id) and the field used to label the item.
25
25
26
26
### valueField?{ type: 'String' }
27
27
28
- A dataItem field name for uniquely identifying items in the ` data ` list. A ` valueField ` is required
28
+ A dataItem field name for uniquely identifying items in the ` data ` list. A ` valueField ` is required
29
29
when the ` value ` prop is not itself a dataItem. A ` valueField ` is useful when specifying the selected item, by
30
30
its ` id ` instead of using the model as the value.
31
31
32
- When a ` valueField ` is not provided, the {widgetName} will use strict equality checks (` === ` ) to locate
32
+ When a ` valueField ` is not provided, the {widgetName} will use strict equality checks (` === ` ) to locate
33
33
the ` value ` in the ` data ` list.
34
34
35
35
<EditableExample codeText={require('../examples/valueField')(widgetName)}/>
36
36
37
37
### textField?{ type: 'String | Function(dataItem)' }
38
38
39
- {` Specify which data item field to display in the ${widgetName} and selected item. The ` }` textField ` {`prop
39
+ {` Specify which data item field to display in the ${widgetName} and selected item. The ` }` textField ` {`prop
40
40
may also also used as to find an item in the list as you type. Providing an accessor function allows for computed text values`}
41
41
42
42
<EditableExample codeText={require('../examples/textField')(widgetName)}/>
43
43
44
44
### valueComponent?{ type: 'Component' }
45
45
46
- This component is used to render the selected value of the combobox . The default component
46
+ This component is used to render the selected value of the ${widgetName} . The default component
47
47
renders the text of the selected item (specified by ` textfield ` )
48
48
49
49
<EditableExample codeText={require('../examples/valueComponent')(widgetName)}/>
50
50
51
51
### itemComponent?{ type: 'Component' }
52
52
53
- This component is used to render each possible item in the DropdownList . The default component
53
+ This component is used to render each possible item in the ${widgetName} . The default component
54
54
renders the text of the selected item (specified by ` textfield ` )
55
55
56
56
<EditableExample codeText={require('../examples/itemComponent')(widgetName)}/>
57
57
58
+ ### disabled?{ type: '[ Boolean, Array] ' }
59
+
60
+ Disable the widget, if an ` Array ` of values is passed in only those values will be disabled.
61
+
62
+ <EditableExample codeText={require('../examples/disabled')(widgetName, 'disabled', false)}/>
63
+
64
+ ### readOnly?{ type: '[ Boolean, Array] ' }
65
+
66
+ Place the {widgetName} in a read-only mode, If an ` Array ` of values is passed in only those values will be read-only.
67
+
68
+ <EditableExample codeText={require('../examples/disabled')(widgetName, 'readOnly', false)}/>
69
+
58
70
### groupBy?{ type: 'String | Function(Any dataItem)' }
59
71
60
- Determines how to group the {widgetName} dropdown list . Providing a ` string ` will group
72
+ Determines how to group the {widgetName}. Providing a ` string ` will group
61
73
the ` data ` array by that property. You can also provide a function which should return the group value.
62
74
63
75
<EditableExample codeText={require('../examples/groupby')(widgetName)}/>
64
76
65
77
### groupComponent?{ type: 'Component' }
66
78
67
- This component is used to render each option group, when ` groupBy ` is specified. By
79
+ This component is used to render each option group, when ` groupBy ` is specified. By
68
80
default the ` groupBy ` value will be used.
69
81
70
82
@@ -79,7 +91,7 @@ Text to display when the value is empty.
79
91
80
92
The string value of the current search being typed into the {widgetName}. When
81
93
unset (` undefined ` ) the {widgetName} will handle the filtering internally.
82
- The ` defaultSearchTerm ` prop can be used to set an initialization value for uncontrolled widgets. searchTerm is only
94
+ The ` defaultSearchTerm ` prop can be used to set an initialization value for uncontrolled widgets. ` searchTerm ` is only
83
95
relevant when the ` filter ` prop is set.
84
96
85
97
@@ -105,7 +117,7 @@ when the `open` prop is set otherwise the widget open buttons won't work.
105
117
106
118
### filter?{ type: '[ String, Function(dataItem, searchTerm)] ', default: 'false' }
107
119
108
- Specify a filtering method used to reduce the items in the dropdown as you type. There are a few prebuilt filtering
120
+ Specify a filtering method used to reduce the items in the dropdown as you type. There are a few built-in filtering
109
121
methods that can be specified by passing the ` String ` name.
110
122
111
123
To handle custom filtering techniques provide a ` function ` that returns ` true ` or ` false ` for each passed in item
@@ -168,4 +180,4 @@ Text to display when the the current filter does not return any results.
168
180
- <kbd >home</kbd > move focus to first item
169
181
- <kbd >end</kbd > move focus to last item
170
182
- <kbd >enter</kbd > select focused item
171
- - <kbd >any key</kbd > search list for item starting with key
183
+ - <kbd >any key</kbd > search list for item starting with key
0 commit comments