indrimuska / angular-selector

A native AngularJS directive that transform a simple <select> box into a full html select with typeahead.
http://indrimuska.github.io/angular-selector
MIT License
96 stars 36 forks source link

Prevents empty selectedValues from raising an error when it shouldn't. #62

Closed juliomenendez closed 8 years ago

juliomenendez commented 8 years ago

Fixes this issue when the selectedValues is empty.

screen shot 2016-08-24 at 11 20 51 am

indrimuska commented 8 years ago

Thank you @juliomenendez for posting this. Can you please provide a valid example showing how to reproduce this issue?

juliomenendez commented 8 years ago

Basically on any selector where the model is null and the field is required.

select(selector, value-attr='value', model='$ctrl.frequency', placeholder='Frequency...', options='$ctrl.availableFrequencies', require='true')

Sorry, the example is in jade/pug.

indrimuska commented 8 years ago

Got it, thanks! I'm going to review it and I'll get back to you.

indrimuska commented 8 years ago

Well, it works very well but I can't merge into your branch since the correct fix consists on forcing selectedValues to be an array. I'm going to release a new version with the solution for this.

Thank you again for submitting this. 👍

indrimuska commented 8 years ago

The fix for this issue has been released in version 1.4.4.

juliomenendez commented 8 years ago

Perfect, thank you!