Need to apply background color to p-dropdown list dynamically

Post Reply
Lakshmi_984
Posts: 2
Joined: 03 Dec 2018, 14:40

05 Dec 2018, 15:03

Need to apply background color to p-dropdown list dynamically

cagatay.civici
Prime
Posts: 18015
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Dec 2018, 11:05

Dropdown component has panelStyleClass you can utilize, for example creating two styles;

Code: Select all

.mypanel1.ui-dropdown-panel {
    background-color: blue
}

.mypanel2.ui-dropdown-panel {
    background-color: blue
}
Then;

Code: Select all

<p-dropdown [panelStyleClass]="condition ? mypanel1 : mypanel2"

Lakshmi_984
Posts: 2
Joined: 03 Dec 2018, 14:40

06 Dec 2018, 14:23

panel style is applicable for Overlay panel right not for the dropdown. I want to apply the background color for dropdown list.

Post Reply

Return to “PrimeNG Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest