I am working on implementing Autocomplete feature for my form fields and all the suggestion items comes from a service in an array of string literals. Looks like suggestion item template requires a key so it can pull the value of the current item in aggregation.
<Input required="true" value="{ComponentSearch>/search/componentName}" valueLiveUpdate="true" showSuggestion="true" suggest="handleSuggest" name="Name" suggestionItems="{ path: 'Global>/names', templateShareable:false}"> <suggestionItems> <core:Item text="{Global>Name}"/> </suggestionItems> </Input>
Right now, i am converting my model data structure from array of strings to array of objects with key as "Name". It works. But, it's a overhead as there are lot of form fields and data grows continuously.
Is there a way, i can refer the index number during aggregation and call something like
suggestionItems="{ path: 'Global>/names', templateShareable:false}"> <suggestionItems> <core:Item text="{Global>$index}"/> </suggestionItems>
Add comment