[]
        
(Showing Draft Content)

Search During IME Composition

Autocomplete and MultiAutocomplete can search for matching items while text is being composed through an Input Method Editor (IME).

IME input is commonly used for languages such as Chinese, Japanese, and Korean. By default, the controls search after IME composition is committed. Set SearchDuringComposition to trueto filter items using the text currently being composed.

Searches performed during composition continue to use the configured MinLength, Delay, and MaxItems settings.

The default value of SearchDuringComposition is false.

Autocomplete with SearchDuringComposition Enabled.

The following example configures Autocomplete to search Korean text during composition.

In Code

Controller

public ActionResult Index()
{
    var items = new List<string>
    {
        "가",
        "가나다",
        "가나다라",
        "가족",
        "강아지",
        "한국",
        "한국어",
        "한강"
    };
    return View(items);
}

View

@model IList<string>
@(Html.C1().AutoComplete()
    .Bind(Model)
    .MinLength(1)
    .SearchDuringComposition(true)
    .Placeholder("Type with an IME"))