leocaseiro / angular-chosen

AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
http://leocaseiro.github.io/angular-chosen/
MIT License
682 stars 248 forks source link

Changes in model value is not reflected from chosen dropdown text in 1.5.1 #227

Closed tsampath closed 7 years ago

tsampath commented 7 years ago

Please mark the options you have done, before open this Issue. We'll prioritize the issues that are consistent and completed.

Please, post your plunker link here:

(plunker link goes here)

If you need a starter plunker for a single select, use this one: https://plnkr.co/edit/Ec9l1C?p=preview

If you need a starter for a multiple select, use this one: https://plnkr.co/edit/vaRw1x?p=preview

Write your issue:

I tested my code with chosen code in below plunker. Then it works like charm http://plnkr.co/edit/SxaKdz?p=preview

tsampath commented 7 years ago

Tested on 1.4.1. It works well with that version.

leocaseiro commented 7 years ago

Hi @tsampath,

I believe your solution is in the documentation and is about the ng-model:

As same as any <select multiple>, Angular works better with an object.child, or .(dot). Watch it: https://egghead.io/lessons/angularjs-the-dot Reference: http://stackoverflow.com/a/17607794/3415716

Here is your plunker with 1.5.1 working with this solution: http://plnkr.co/edit/3Ge10O?p=preview

Lobosque commented 7 years ago

I believe he is basically referring to #221 which I am also experiencing.

Lobosque commented 7 years ago

For me it starts to break at 1.4.3. It works well with chosen 1.4.1 and 1.4.2.

leocaseiro commented 7 years ago

Hi @Lobosque, thank you for reporting this issue.

The only thing is that I've never really understood #221. So, would you mind opening an issue and giving me details about what's the problem you're having?

Thanks

leocaseiro commented 7 years ago

ping @tsampath ?