2
<div class="form-group">
    <label class="control-label"> Ticket Closure Type </label>
    <ui-select ng-model="resCode" theme="bootstrap"
               ng-click="vm.getClosureTypeOfCloseTicket(resCode)">
        <ui-select-choices ng-repeat="resolutionCode in resolutionCodes | filter: $select.search">
           {{resolutionCode.csmClosureReasonCode}}
        </ui-select-choices>
    </ui-select>

    <!-- <select ng-model="resCode" on-select="vm.getClosureTypeOfCloseTicket(resCode)">
        <option repeat="resolutionCode in resolutionCodes">{{resolutionCode.csmClosureReasonCode}}</option>
    </select> -->

</div>

The code piece I commented out is working as intended. On the other hand when I want to use ui-select, it gives the error below.

Error: [ui.select:transcluded] Expected 1 ui-select-match but got 0

4
  • What version of ui-select are you using? Commented Feb 6, 2020 at 10:36
  • @KScandrett 0.19.6 Commented Feb 6, 2020 at 10:38
  • I wonder if it could also be your filter filter: $select.search I suggest you try removing that Commented Feb 6, 2020 at 10:58
  • Unfortunately removing that also did not solve the problem Commented Feb 6, 2020 at 11:17

3 Answers 3

3

Add classes of the same name to ui-select-match and ui-select-choices.

Source: https://github.com/angular-ui/ui-select/issues/218#issuecomment-292962397

& https://github.com/angular-ui/ui-select/issues/1325#issuecomment-160922087

Sign up to request clarification or add additional context in comments.

2 Comments

I tested using this plunk next.plnkr.co/edit/…. It's using a different version to your ui-select, but you may find it still resolves the problem. Officially they say it was fixed in ui-select v0.14.3+, but other comments suggest it was found broken again
This did it for me. My error appeared after migrating to angularjs 1.5
1

you have to append ui-select-match directive to ui-select.

<ui-select-match placeholder="Select person...">{{$item.name}} &lt;{{$item.email}}&gt;</ui-select-match>

add something like above according to your need.

Comments

0

Add the tagging attribute binded to a function that return null

HTML:

<ui-select ... tagging="tagHandler" ... >

JS:

$scope.tagHandler = function (tag){
    return null;
}

Comments

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.