Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm trying to use the ui-select directive, and have gotten all the way through except for removing items. Whenever I click on the 'x', the page tries to validate the form and won't remove the item. If I do submit the form, the data is passed back properly.

<ui-select multiple ng-model="user.roles" theme="bootstrap">
    <ui-select-match placeholder="Select roles...">{{$item.name}}</ui-select-match>
    <ui-select-choices repeat="item.id as item in roleList">
        <div>{{item.name}}</div>
    </ui-select-choices>
</ui-select>

When I try to change the template to "select2" (which is the base control that my designer gave me), rather than failing due to form validation issues, it just takes me back to the root page in my site. I can go with either theme - I just need one where I can click on the 'x' and get the item removed.

Both themes also have trouble with the search box not being sized properly until I start using the control.

Any ideas?

share|improve this question

1 Answer 1

Upgrade to the most recent version of ui-select. I had this problem with version 0.7.0 but it was fixed in 0.8.2.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.