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
Copy file name to clipboardExpand all lines: components/combobox/overview.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,24 +82,25 @@ The ComboBox is a generic component and its type is determined by the type of th
82
82
83
83
## Selected Item
84
84
85
-
By default, if no `Value` is provided, the ComboBox will appear empty, or will display the `Placeholder` defined.If a Value is provided, the first item from the data source whose ValueField matches will be selected.
85
+
By default, if no `Value` is provided, the ComboBox will appear empty, or will display the `Placeholder` defined.If a `Value` is provided, the first item from the data source whose ValueField matches will be selected.
86
86
87
87
The ComboBox will not always have a selected item, however, because it can act as an input. There will be no selected item in the following cases that depend on the settings of the component that the developer can control:
88
88
89
89
* the user clears the value through the Clear button,
90
90
* the user clears the value with `Backspace` or `Del` keys,
91
-
*`AllowCustom="false"` - ComboBox's input value will be automatically cleared on change event (`blur` or `Enter`) (see the table below).
91
+
*`AllowCustom="false"` - when a custom value is typed, the ComboBox input value will be automatically cleared on the change event (`blur` of the input or `Enter` keypress). See the table below.
92
+
*`AllowCustom="true"` - when the user starts typing a custom value.
92
93
93
94
94
95
Missing selection is most common when the initial value is `null` as data sources rarely have items with a `null` value, and/or when you want to let your users type in values that are not in your predefined set of options.
95
96
96
97
If the user types text in the input, selection behaves according to the following table:
97
98
98
99
99
-
| User input matches an item | AllowCustom=`true`| AllowCustom=`false`|
100
+
| User input matches the value of an item | AllowCustom=`true`| AllowCustom=`false`|
| Yes | Matched item is selected. | Matching item is selected. |
102
-
| No | No item is selected. `Value` is updated to the custom one | No item is selected. `Value` is updated to the`default(typeof(Value))`. The `OnChange` event does not fire for the value clearing. |
103
+
| No | No item is selected. `Value` is updated to the custom one.| No item is selected. `Value` is updated to `default(typeof(Value))`. The `OnChange` event does not fire for the value clearing. |
0 commit comments