Skip to Content
author's profile photo
Former Member

How to access iterating index in aggregation binding

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"
       suggestionItems="{ path: 'Global>/names', templateShareable:false}">
        <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}">
        <core:Item text="{Global>$index}"/>
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers