I have many (around 70, forms dynamically) ui-select (multiple) elements and every is filled with the same data.
<tr ng-repeat="entities in value">
<td>{{entities.ourTag.displayName}}</td>
<td>
<ui-select multiple
ng-model="entities.thairTag" theme="select2"
ng-disabled="disabled" on-remove="onSelectCallback()"
on-select="onSelectCallback()">
<ui-select-match placeholder="Select tag...">{{$item.name}}</ui-select-match>
<ui-select-choices
group-by="groupByCategory" repeat="thairTag in thairTags | propsFilter: {name: $select.search} track by $index">
<div
ng-bind-html="thairTag.name | highlight: $select.search" />
</ui-select-choices>
</ui-select></td>
</tr>
Calling group-by
on every iteration make my page load up to 5 seconds and if I'll remove it it will make this process twice faster so my thoughts was to call it on ui-select click. Any ideas how could I do this or may be additional ways to optimize this solution? Quick example of what it looks like is here.
Also bindonce with repeat="thairTag in ::thairTags"
is not working.