This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(ngOptions): use documentFragment to populate select
This changes the way option elements are generated when the ngOption collection changes. Previously, we would re-use option elements when possible (updating their text and label). Now, we first remove all currently displayed options and the create new options for the collection. The new options are first appended to a documentFragment, which is in the end appended to the selectElement. Using documentFragment improves render performance in IE with large option collections (> 100 elements) considerably. Creating new options from scratch fixes issues in IE where the select would become unresponsive to user input. Fixes #13607 Fixes #13239 Fixes #12076
- Loading branch information
Showing
2 changed files
with
41 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters