Dropdown: p-dropdown disabled property doesn't work with reactive forms only
Describe the bug
Adding a disabled property on the p-dropdown component does not disable it when using reactive forms but works with template forms.
reactive form: https://stackblitz.com/edit/zjnhge-6dbvzu
template form: https://stackblitz.com/edit/7ajim1-dw9brl
Environment
stackblitz
Reproducer
No response
Angular version
18.0.1
PrimeNG version
17.18.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v18.20.3
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
disabled property should disable the dropdown
hi @bvx5009 , To disable the input of a reactive form, you should do it this way
,Then you need to remove [disabled]='true' from your HTML; this is only useful when using [(ngModel)]
@dl3g0 thanks for the reply!
yeah, that is what i ended up doing at the end. Seems like we should update the documentation or something. If i have a conditional variable to disable my form i have to do it in the ts rather than the property
Hi,
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?
Thanks a lot for your understanding! Best Regards,