imevro / ng-selectize

AngularJS directive for Selectize.js
39 stars 10 forks source link

$digest error #2

Closed vinsonio closed 9 years ago

vinsonio commented 9 years ago

Hi author & others,

I got "Error: [$rootScope:inprog] http://errors.angularjs.org/1.4.0-rc.2/$rootScope/inprog?p0=%24digest" after selected an option.

HTML:

<select selectize="selectizeProducts" options="products" ng-model="product_id"></select>

AngularJs:

$scope.products = [];

$http.get('/product/get_list').success(function(data, status, headers, config) {
    $scope.products = data;
});
$scope.selectizeProducts = {
        valueField: 'id',
        labelField: 'name',
        searchField: 'name',
        placeholder: "Please select...",
        onChange: function(id) {
            getProductInfo(id);
        }
    };
Anahkiasen commented 9 years ago

Same here

imevro commented 9 years ago

Sorry, guys, at now I don't have time for digging that problem, can anyone make PR, if have fix?

nixolas1 commented 9 years ago

Remember to use < input > elements for multiselects, not < select >. That fixes it for multiselect.

yakovkhalinsky commented 9 years ago

I've had to resolve this for our team.

PR coming soon :+1:

yakovkhalinsky commented 9 years ago

For the people following this issue #3 has been merged and version 0.0.4 from bower will include this $digest fix :+1:

imevro commented 9 years ago

Yep. Thanks, @yakovkhalinsky.