3

The following the original code that the search box works perfectly find for the dropdownlist:

   <ui-select ng-model="ctrl.selected" on-select="ctrl.refreshData()" theme="bootstrap">
 <ui-select-match placeholder="Select Profile"><span ng-bind="$select.selected.profile"></span></ui-select-match>
 <ui-select-choices repeat="data in ctrl.profile | filter:$select.search">
  <span ng-bind="data.profile | highlight: $select.search"></span>
 </ui-select-choices>
</ui-select>

After I added translation into the code for chinese translation, the search box is not working for Chinese. Only English is working.

 <ui-select ng-model="ctrl.selected" on-select="ctrl.refreshData()" theme="bootstrap">
  <ui-select-match placeholder="{{'translate.profile' | translate }}"><span translate="{{$select.selected.translateProfile}}" translate-default="{{$select.selected.profile}}"></span>
  </ui-select-match>
  <ui-select-choices repeat="data in ctrl.profile | filter:$select.search">
    <span ng-bind="( data.translateProfile | translate ) | highlight: $select.search"></span> 
  </ui-select-choices>
</ui-select>
Draken
  • 3,134
  • 13
  • 34
  • 54

0 Answers0