Questions tagged primeng-dropdowns

Explore the latest questions and answers asked by our top developers.

PrimeNg custom validation using CSS

I am using validationFlag in my TS code. Based on this I want to validate and focus PrimeNG elements (p-dropdown, p-autocomplete). I have tried below approach seems not working. However if I try similar on HTML elements then it works. Has anyone faced similar issues? None of below working – <p-dropdown placeholder="1" [ngStyle]=" {‘border-color’:’red’}" > […]

By Vikas
Published
Categorized as angular, css, primeng, primeng-dropdowns Tagged , , ,

Open a new primeng table on cell click of an exiting primeng table

I have a primeng table with some definite rows and columns. There are some cells which have simple edits(like numerals), some cell which are dropdowns. However the requirement is to have some particular cells which on click should open a modal table. I was thinking of embedding the p-table in a modal p-dialog with visibility […]

Angular p-dropdown create options dynamically from one options array

I am trying to create multiple dropdowns in Angular and need every drop down to display one less option. I got this far but now my dropdown always initializes with a value. I have multiple dropdown and try to use one single options array and generate my data based on these options. I also dont […]

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

PrimeNG Dropdown binding to disabled property not working

I have a PrimeNG p-dropdown control with its disabled property bound to a boolean property. Essentially it looks like this: <p-dropdown [disabled]="disableGroupsDropdown"></p-dropdown> This boolean defaults to true, and the dropdown is properly disabled. I have other code that can modify this boolean property. When I execute this code, the state of the dropdown doesn’t change. […]

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

Primeng dropdown does not sidplay the values

I am facing a strange issue. I want to populate a dropdown from an http request. The array declared as an Agence object is filled with the correct attributes from my backend but it cannot display the values. <p-dropdown [options]="agences" [(ngModel)]="codeAgence" optionLabel="code" [ngModelOptions]=" {standalone: true}"></p-dropdown> I push a first line manually on the array, the […]

Dropdown from primeng lib doesn’t work the proper way – "Expecting instance of DOM Element" is thrown

I use primeNg lib for my project. Recently I have added a paginator component and tried to use the embedded dropdown. Here is a trick – instead of using AnimationRendererfrom @angular/platform-browser/animation, my app calls DebugRenderer2. According to requirements I imported BrowserAnimationsModule to app.module.ts and uncommented this string in polyfills.ts import ‘web-animations-js’; // Run `npm install […]

primeNg : get value of all the p-dropdown on change event of one drop down

I have a situation were on my html page is have 5 primeNg p-dropdown and I want to read the values of all the 5 dropdown on change event of any of the p-dropdown so that I can apply filters on all the selected values to show data in data grid. I am trying with […]

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

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 […]

By Daniel Cruz
Published
Categorized as angular, primeng, primeng-dropdowns Tagged , ,

Typescript strict mode cannot assign Observable async to primeNg dropdown component

I am using the p-dropdown primeNg component and from what I can see this should be able to take an Observable | async value and use it properly but the Typescript strict mode will not allow this, giving error TS2322: Type ‘Customers[] | null is not assignable to type ‘any[]’" customers.html <p-dropdown [options]="customers$ | async" […]

How to set value PrimeNG p-dropdown with a value read from the server?

I receive the value of myModel.field correctly from a server (for example myModel.field = "id2"), but it is not selected in the p-dropdown, what should I do? This is my options (the dropdown populates fine): options = [ { label: ‘Opt1’, value: ‘id1’ }, { label: ‘Opt2’, value: ‘id2’ }, { label: ‘Opt3’, value: ‘id3’ […]

By doinel
Published
Categorized as angular, primeng, primeng-dropdowns Tagged , ,
1 2 3

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