In the current Lightning Developer guide, there is a component ui:autocomplete that is referenced. When I try to use that component in my Lightning component I receive an error stating that the component is undefined and cannot be found. Has this component been deprecated? It is still referenced in the most recent online guide so I was confused why it is still mentioned there.

The link to the guide: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ui_autocomplete.htm?search_text=autocomplete

  • No, please don't use that. There's a filtering bug in the search results that's displaying topics from the open source dev guide. That's currently getting fixed. If the topic doesn't exist in the TOC, it shouldn't be used for Lightning Components. Jul 21 '15 at 21:53
  • Thanks! Is there an alternative to that you would suggest that works well in Lightning? Jul 21 '15 at 21:54
  • Does anyone have any other insight on this question? Or possibly another suggestion regarding what could be used for a Typeahead kind of functionality in Lightning? Jul 29 '15 at 4:00
  • You can try wiring up ui:inputText to a keyup handler that fires an event containing the search term, like in this tutorial. Jul 30 '15 at 5:22
  • Diana, thanks for the comment. If you would like to add your comment as an answer I can mark this one as answered. That is the method I ended up implementing and it seems to work well. Aug 6 '15 at 14:34

ui:autocomplete is available only in the open-source framework, and not in Lightning Components (there's a filtering bug in the search result that's exposing this topic).

You can use a component like ui:inputText and wire that up to a keyup handler. Then, fire an event in the handler (JS controller) with the search string. You can listen for and handle this event accordingly. A tutorial that walks through setting this up can be found at this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.