user4870812
user4870812

Reputation:

AngularJS - How to clear query text in input of ui-select multiple options

I am using ui-select(version - 0.11.2), my HTML code follows:

<ui-select ng-model="staff.selected" ng-disabled="disabled" reset-search-input="false" multiple>
    <ui-select-match placeholder="Staff">{{$item.name}}</ui-select-match>
    <ui-select-choices repeat="staff in staffs" refresh="refreshStaff($select.search)" refresh-delay="0">
        <div ng-bind-html="name | highlight: $select.search"></div>
    </ui-select-choices>
</ui-select>

Here I am using multiple to select multi options. After I searched for query on type it's remains showing. How can I shouldn't show that?

JS code

$scope.refreshStaff = function(name) {
  Staffs.query($scope.queryCriteria).then(function(response) {
    return response.data;
  });
}

Upvotes: 4

Views: 3314

Answers (1)

Timur
Timur

Reputation: 26

<ui-select ... reset-search-input="true">

Upvotes: 1

Related Questions