Skip to content

Commit 5067796

Browse files
docs(combobox): clarification on item selection
1 parent e579241 commit 5067796

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

components/combobox/overview.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,25 @@ The ComboBox is a generic component and its type is determined by the type of th
8282

8383
## Selected Item
8484

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.
8686

8787
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:
8888

8989
* the user clears the value through the Clear button,
9090
* 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.
9293

9394

9495
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.
9596

9697
If the user types text in the input, selection behaves according to the following table:
9798

9899

99-
| User input matches an item | AllowCustom=`true` | AllowCustom=`false` |
100+
| User input matches the value of an item | AllowCustom=`true` | AllowCustom=`false` |
100101
|----------------------------|----------------------|------------------------------------------|
101102
| 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. |
103104

104105

105106

0 commit comments

Comments
 (0)