AutoSuggestBox.onquerychanged event

Raised when the user or the app changes the queryText.

Syntax

<div 
    data-win-control="WinJS.UI.AutoSuggestBox" 
    data-win-options="{onquerychanged : handler}">
</div>
function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
autoSuggestBox.addEventListener("querychanged", handler);
autoSuggestBox.removeEventListener("querychanged", handler);

Event information

Synchronous No
Bubbles Yes
Cancelable Yes

 

Event handler parameters

  • eventInfo
    Type: CustomEvent**

    An object that contains information about the event. The detail property of this object contains the following sub-properties:

    • detail.language
      The current locale.

    • detail.queryText
      The new query text.

    • detail.linguisticDetails
      A SearchQueryLinguisticDetails object that provides linguistic info about the query text.

Requirements

Minimum WinJS version

WinJS 4.0

Namespace

WinJS.UI

See also

AutoSuggestBox