this.items = Array.from(Array(100), (item, index) => ({
name: `Item ${index}`,
chips: Array.from(Array(10), (item, index) => `Chip ${index}`);
})
);
div(ng-repeat="item in controller.items")
b {{item.name}}
md-chips(ng-model="item.chips" readonly="true")
Render immediate
Was added ~12000 watchers and make ~1000 digests (once per added chip). Page will be lags 3-6 sec.
Digests were called from here: https://github.com/angular/material/blob/97455f529fd4bbf162d03f74e887dc6aa3f04a00/src/components/chips/js/chipDirective.js#L60
I think in readonly mode $timeout with call focusLastChipThenInput can not be run.
Yeah, that seems like a performance problem. Can you please provide a CodePen demo?
Yeah, that seems like a performance problem. Can you please provide a CodePen demo?
Currently experiencing the same issue with AngularJS 1.5.10.
In my case I noticed because every time the readonly is enabled or disabled, it creates watchers and they start increasing indefinitely with each change of that attribute.
Most helpful comment
https://codepen.io/marvelsrp/pen/RzZXgW