amitava82 / angular-multiselect

[NOT MAINTAINED]Native AngularJS multiselect directive
http://amitava82.github.io/angular-multiselect
MIT License
140 stars 124 forks source link

browser stuck with large array of options #75

Closed akhil-karat closed 8 years ago

akhil-karat commented 8 years ago

I need to show a multiselect dropdown with more than 1 lakh options. When tried to give an array of more than 1 lakh numbers (each option will look like: 12345-67589-10) the browser stucks and i need to close window and restart browser again. I used limitTo in ng-repeat. Still got issue. The problem is with watch function for options.-

scope.$watch(function () {
            return parsedResult.source(originalScope);
        }, function (newVal) {
        if (angular.isDefined(newVal))
            parseModel();
        }, true);

Please give a fix for this asap. I am stuck with this. I need to show a multiselect dropdown with more than 1 lakh options. When tried to give an array of more than 1 lakh numbers (each option will look like: 12345-67589-10) the browser stucks and i need to close window and restart browser again. I used limitTo in ng-repeat. Still got issue. The problem is with watch function for options.-

scope.$watch(function () {
return parsedResult.source(originalScope);
}, function (newVal) {
if (angular.isDefined(newVal))
parseModel();
}, true);

Please give a fix for this asap. I am stuck with this.

amitava82 commented 8 years ago

Dropdown with hundred thousand items is poor choice of UI and I'm pretty sure any dropdown library would fail to render these number of items. Rethink your design to use server side search. If you think you can solve with this multiselect library, you are welcome to create PR.