2

I have a problem with angular-ui-select.

When it's closed it looks like this

enter image description here

But when it's opened the placeholder doesn't show up and it looks like this:

enter image description here

This is my code:

<ui-select ng-model="selected.address" style="width: 50%;">
  <ui-select-match>
    <span ng-bind="$select.selected.description"></span>
  </ui-select-match>
  <ion-list ui-select-choices refresh="getPlaces()" refresh-delay="10" repeat="item in places track by item.id">
    <ion-item class="item-icon-left">
      <i class="icon icon-left ion-android-compass"></i>
      <h3 ng-bind="item.address"></h3>
    </ion-item>
  </ion-list>
</ui-select>

Note 1: I get my data from a server and there could be a lot of fields to display.

Note 2: I'm using the 'selectize' theme because I can't use Bootstrap in my Ionic app

Do you have any suggestions of why this is happening and how to fix it?

EDIT : The "activities label in the second image is there because the dropdown goes over the next field, no big deal here.

Community
  • 1
  • 1

1 Answers1

0

You need to turn on enableSearch. That should turn the placeholder on.

$scope.enableSearch = function () {
        $scope.searchEnabled = true;
    };
Mahib
  • 3,977
  • 5
  • 53
  • 62