1

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

5
  • 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. Commented Jul 21, 2015 at 21:53
  • Thanks! Is there an alternative to that you would suggest that works well in Lightning? Commented Jul 21, 2015 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? Commented Jul 29, 2015 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. Commented Jul 30, 2015 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. Commented Aug 6, 2015 at 14:34

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .