Dropdown: Infinite loop dynamic options array #14319
Labels
LTS-16-PORTABLE
LTS-FIXED-16.9.4
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Since primeng 17 we can not pass a function or a getter wich build or filter an array to the OPTIONS parameter of a primeng dropdown. In this case, an infinite loop ocure in the browser. This behavior work well with angular 16.2.12 and primeng 16.6.0 (see stackblitz example). I didn't find a workaround yet.
Environment
Reproductible with last angular 17 version and last primeng 17 version only.
Reproducer
https://stackblitz.com/edit/github-mq6jyg?file=src%2Fapp%2Fapp.component.html
Angular version
17.0.0
PrimeNG version
17.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.10.0
Browser(s)
Chrome 119.0.6045.160
Steps to reproduce the behavior
Run the stackblitz example with angular 17.0.0 and primeng 17.0.0. The browser will loop.
Comment the two last dropdown of app.component.html and then it work.
Expected behavior
Same behavior of primeng 16 is expected. No infinite loop with two last dropdown uncommented. The last dropdown must display everything except ROME.
The text was updated successfully, but these errors were encountered: