Describe the bug
Due to the newly changes on the autocomplete I create a PR https://github.com/primefaces/primeng/pull/18593 which got merged. But the forceSelection now is buggy when minQueryLength is given. I made a mistake by thinking that hide() is the right place to check for inputChange on ForceSelection. But hide get called everytime something prevents it from showing like minQueryLength, which now caused an immediate clear.
I submitted a PR.
Pull Request Link
#19219
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/qmxqgeee-adfsijon?file=src%2Fapp%2Fforce-selection-demo.html,src%2Findex.html,src%2Fapp%2Fforce-selection-demo.ts,src%2Fapp%2Fforce-selection.scss,angular.json,src%2Fstyles.scss,src%2Fmain.ts,src%2Fapp%2Fcountryservice.ts
Environment
PrimeNG 21.0.2
Angular version
21
PrimeNG version
v21
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
- Click on Autocomplete with ForceSelection and minQueryLength > 1
- Write something
- Input gets cleared without blurring out
Expected behavior
- Click on Autocomplete with ForceSelection and minQueryLength > 1
- Write something
- Input gets not removed
Describe the bug
Due to the newly changes on the autocomplete I create a PR https://github.com/primefaces/primeng/pull/18593 which got merged. But the forceSelection now is buggy when minQueryLength is given. I made a mistake by thinking that hide() is the right place to check for inputChange on ForceSelection. But hide get called everytime something prevents it from showing like minQueryLength, which now caused an immediate clear.
I submitted a PR.
Pull Request Link
#19219
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/qmxqgeee-adfsijon?file=src%2Fapp%2Fforce-selection-demo.html,src%2Findex.html,src%2Fapp%2Fforce-selection-demo.ts,src%2Fapp%2Fforce-selection.scss,angular.json,src%2Fstyles.scss,src%2Fmain.ts,src%2Fapp%2Fcountryservice.ts
Environment
PrimeNG 21.0.2
Angular version
21
PrimeNG version
v21
Node version
No response
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior