Need to apply background color to p-dropdown list dynamically

Post Reply
Lakshmi_984
Posts: 5
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: 18616
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: 5
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.

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

23 Jan 2019, 09:26

Not sure what you mean, there is also styleClass for the p-dropdown.

Post Reply

Return to “PrimeNG Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests