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

must have <option value=""></option> else get error #71

Closed lars159 closed 8 years ago

lars159 commented 10 years ago

if is left out then on single with deselect localytics goes crazy

test code: 2014-08-13 15_52_47-mozilla firefox

simulateAjax([{'name': 'grooo'},{'name': 'gro3oo'},{'name': 'grooo3'},{'name': 'gr1ooo'}, {'name': 'gro1oo'}]).then(function(result) {
    return $scope.optionsFromQuery = result;
  });

<select chosen allow-single-deselect="true" data-placeholder="Choose Your Own Adventure" no-results-text="'Tough luck'" ng-model="foo" ng-options="value.name for value in optionsFromQuery" style="width:200px;">

leocaseiro commented 8 years ago

Hi, sorry for the delay, I've just taken this project that was abandoned (read #162).

Thanks for lettings us know! This is a known issue and it's in the docs.

Note: the empty <option value=""></option> element is mandatory when using allow-single-deselect