Open bvx5009 opened 2 weeks ago
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
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