PrimeNg MenuItem still clickable when disabled

Viewed 107

I'm using PrimeNg MenuItems for navigation links on my website and I conditionally set the disabled property to true. The links appear to be disabled but they still work when you click.

The PrimeNg MenuItem documentation has no explanation for this.

The workaround I made was to also set the routerLink to false as seen in the second menuItem in the image below.

enter image description here

I'd like to know if there's a reason/explanation for this behavior or if there's a cleaner solution to it.

0 Answers
Related