New to Kendo UI for AngularStart a free 30-day trial

Custom Values

By default, when the Enter key is pressed or after the component loses focus, values that do not appear in the supplied list of items are dismissed.

To configure the ComboBox to accept custom values, set the allowCustom property to true.

This feature is not available when using adaptive mode.

Primitive Values

If the component is bound to primitive values (strings, numbers, or other), set the allowCustom property to true.

This approach is valid when the component is either bound to a dataset of primitive (strings, numbers, or other) or complex values (objects), and the valuePrimitive property is set to true.

The following example demonstrates how to allow custom primitive values.

Change Theme
Theme
Loading ...

Complex Values

If the component is bound to objects, set the allowCustom property to true and provide a valueNormalizer function. The purpose of the valueNormalizer function is to convert the user text input into an object that can be recognized as a valid ComboBox value.

The valueNormalizer function receives Observable<string> as an argument and is expected to return a single normalized value wrapped as Observable, which will be further processed by the component.

The following example demonstrates how to allow custom object values.

Change Theme
Theme
Loading ...

Using with a Remote Service

The following example demonstrates how to handle custom object values through a remote service.

Change Theme
Theme
Loading ...

Handling Errors

The following example demonstrates how to handle errors that occur while normalizing custom object values through a remote service.

Change Theme
Theme
Loading ...