primeng-dropdowns

Custom content dropdown not working in PrimeNG?

南笙酒味 提交于 2019-12-24 11:01:22
问题 I'm implementing a custom content dropdown. Is not working properly. It does not set selectedTestType value and It gives undefined value in the onChangeTestTypes . <p-dropdown name="classTestTypeCombobox" [options]="TestTypes" [(ngModel)]="selectedTestType" [style]="{'width':'150px'}" filter="filter" [disabled]="this.isProdCodeDisabled" appendTo="body" required #classTestTypeCombobox="ngModel" (ngModelChange)="onChangeTestTypes($event)"> <ng-template let-TestType pTemplate="item"> <div class=

Primeng DataTable Dropdown doesn't work with options via column

♀尐吖头ヾ 提交于 2019-12-10 11:32:22
问题 I'm making a re-usable table component for my application based on DataTable from PrimeNG. My component has the following html code: <p-dataTable [value]="cars" [rows]="5" [paginator]="true" [globalFilter]="gb" [(selection)]="selectedValue" (onRowSelect)="onRowSelect($event)" #dt> <p-column *ngIf="hasSelectCheckbox" [style]="{'width':'38px'}" selectionMode="single"></p-column> <p-column *ngIf="hasExpander" expander="true" styleClass="col-icon"></p-column> <p-column *ngFor="let col of cols"

How to set default value for PrimeNG p-dropdown

為{幸葍}努か 提交于 2019-11-28 12:06:14
I am using PrimeNG in my angular5 app. I have issue with p-dropdown Question I have p-dropdown for showing countries. I bind the select options correctly there it works fine (this data coming from api), but I need to set default selected option for this p-dropdown as "India". I set up ng-model value as India but it didn't work. my dummy.component.html code <div class="form-group col-md-2"> <div> <label for="inputEmail4"> Select Country</label> <span style="color:red">*</span> </div> <p-dropdown name="country" [options]="countries" [(ngModel)]="applicant.country" placeholder="select country"

How to set default value for PrimeNG p-dropdown

▼魔方 西西 提交于 2019-11-27 05:57:18
问题 I am using PrimeNG in my angular5 app. I have issue with p-dropdown Question I have p-dropdown for showing countries. I bind the select options correctly there it works fine (this data coming from api), but I need to set default selected option for this p-dropdown as "India". I set up ng-model value as India but it didn't work. my dummy.component.html code <div class="form-group col-md-2"> <div> <label for="inputEmail4"> Select Country</label> <span style="color:red">*</span> </div> <p