Disable p-dropdown using just html element reference

UI Components for Angular
Post Reply
Devabhai
Posts: 2
Joined: 16 Nov 2019, 17:33

27 Nov 2019, 21:10

Hello everyone,,
I am using some primeNG components inside a p-dialog, and I am trying to disable all at the same time. So I did something like this:

for(let ele of dialog.contentViewChild.nativeElement.children){
ele.disabled = true;
}
reverse image search email checker port checker

This works fine with primeNG InputText, InputTextArea and Button. But it does not work with Dropdown, remaining enabled.

If I set "[disabled]=false" directly into the html it works, but I need to do this dynamically using just the element reference in the For above. What should I do?

yigitfindikli
Posts: 357
Joined: 08 Aug 2018, 14:09

02 Dec 2019, 15:57

Devabhai wrote:
27 Nov 2019, 21:10
Hello everyone,,
I am using some primeNG components inside a p-dialog, and I am trying to disable all at the same time. So I did something like this:

for(let ele of dialog.contentViewChild.nativeElement.children){
ele.disabled = true;
}
reverse image search email checker port checker

This works fine with primeNG InputText, InputTextArea and Button. But it does not work with Dropdown, remaining enabled.

If I set "[disabled]=false" directly into the html it works, but I need to do this dynamically using just the element reference in the For above. What should I do?
Hi,
Because dropdown is a component, we are using disable property in multiple areas. Can you provide a stackblitz example using with https://stackblitz.com/github/primeface ... e-template ? I can more helpfull with example.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests