We have a layout where we'd like to force the options for a p-dropdown to always display above the control.
I've looked through the docs, Google and some of the source code and didn't see any existing way to do this. Have I missed the option? Or is there a way to hack it in there?
Thanks!
p-dropdown: option to always display options above?
-
- Posts: 1
- Joined: 20 Apr 2018, 06:19
Maybe (similar to tooltips) it would be good to have an optional "where" option which defaults to down, but could be overridden?
-
- Posts: 1
- Joined: 13 Sep 2019, 07:06
- Contact:
You can set default value of PrimeNG Dropdown by using ngModel as shown on the following approach:
component.html:
component.ts:
If failed then use below code
component.html:
Code: Select all
<p-dropdown [options]="cities" name="selectedCity" [(ngModel)]="selectedCity"></p-dropdown>
Code: Select all
selectedCity: string = 1; //Id value of the City to be selected
Code: Select all
this.cities.value = this.selectedCity;
-
- Information
-
Who is online
Users browsing this forum: No registered users and 8 guests