3

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.

1
  • If someone experiencing same issue i found some workaround, so options for each select are populated on its call (clicking on drop-down arrow). Commented Jul 10, 2017 at 9:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.