amitava82 / angular-multiselect

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

Add ng-if="isOpen" to ul's in template #74

Closed zachlysobey closed 6 years ago

zachlysobey commented 8 years ago

This decreases watchers and should improve performance.

I'm pretty sure this is a good change, and briefly tested it on my end.

Without this change, my application was becoming very sluggish, as the list items in the drop-downs each created multiple watchers. I'm using this directive several times on the page and iterating over nearly 1000 items each, so this was a very significant problem.

I renamed what appeared to be an unused property on scope to allow this (scope.isVisible).

I'd appreciate some extra eyes on this before merging in, because I still don't completely understand how this project works under the hood and don't want to mess something up.

zachlysobey commented 6 years ago

closing this b/c its 2+ years old.