Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSuggestBox doesn't set the selected value #94

Open
NCC1701M opened this issue Dec 14, 2015 · 1 comment
Open

AutoSuggestBox doesn't set the selected value #94

NCC1701M opened this issue Dec 14, 2015 · 1 comment

Comments

@NCC1701M
Copy link

When I enter something in a AutoSuggestBox the list is shown but when I select a value (by mouse or keyboard) the selected value is not set. It shows only the entered pattern.

<win-auto-suggest-box query-text="orderCtrl.variant" on-suggestions-requested="orderCtrl.requestSuggestions('variant', $event)"></win-auto-suggest-box>

Here the controller function:

function requestSuggestions(type, eventObject) {
      var queryText = eventObject.detail.queryText;

      if (!queryText || queryText.length === 0) {
         return;
      }

      eventObject.detail.setPromise($http.get("/api/suggestions/" + type + "/" + queryText).then(function(response) {
         var suggestionCollection = eventObject.detail.searchSuggestionCollection;
         angular.forEach(response.data, function(item) {
            suggestionCollection.appendQuerySuggestion(item);
         });
      }).catch(function(err) {
         console.log(err);
      }));
   }
@NCC1701M
Copy link
Author

Is this project still alive????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants