p-dropdown ‘required’ property is not setting ‘required’ attribute to its input element (primeng 11)

Published

After using some time primeng components I noticed that the component ‘p-dropdown’ is not adding the ‘required’ attribute to the original input which is inside a div with the class ‘p-hidden-accessible’.
In contrast to the other components such as ‘p-autocomplete’ that is indeed setting the ‘required’ attribute to its inside input element.

Here are some examples which are from primeng documentation:
in the HTML required attribute is set

unfortunately, the inside input does not have one set

I am aware that the ‘required’ attribute is set in the host component, but I need its input element
with the attribute required in order to use it in a custom directive, any advice would be appreciated

Source: Angular Questions

Published
Categorized as angular, primeng, primeng-dropdowns Tagged , ,

Answers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq