Much more powerful is definition of a suggestions by providing a function.
Function takes two parameters:
The response function can be called asynchronously. This gives us opportunity to load the data via REST API, AJAX or websocket channel.
Passing a function also allows us to compute suggestions from local data.