Skip to content

Commit 207ba2d

Browse files
author
Tamas Cseh
committed
Added panelStyle and panelStyleClass attributes to dropdown component
1 parent a9a0fa7 commit 207ba2d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

components/dropdown/dropdown.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const DROPDOWN_VALUE_ACCESSOR: any = {
3131
<div class="ui-dropdown-trigger ui-state-default ui-corner-right">
3232
<span class="fa fa-fw fa-caret-down ui-c"></span>
3333
</div>
34-
<div #panel class="ui-dropdown-panel ui-widget-content ui-corner-all ui-helper-hidden ui-shadow"
35-
[style.display]="panelVisible ? 'block' : 'none'">
34+
<div #panel [ngClass]="{'ui-dropdown-panel ui-widget-content ui-corner-all ui-helper-hidden ui-shadow': true}"
35+
[style.display]="panelVisible ? 'block' : 'none'" [ngStyle]="panelStyle" [class]="panelStyleClass">
3636
<div *ngIf="filter" class="ui-dropdown-filter-container" (input)="onFilter($event)" (click)="$event.stopPropagation()">
3737
<input type="text" autocomplete="off" class="ui-dropdown-filter ui-inputtext ui-widget ui-state-default ui-corner-all">
3838
<span class="fa fa-search"></span>
@@ -62,9 +62,13 @@ export class Dropdown implements OnInit,AfterViewInit,AfterContentInit,AfterView
6262
@Input() filter: boolean;
6363

6464
@Input() style: any;
65+
66+
@Input() panelStyle: any;
6567

6668
@Input() styleClass: string;
6769

70+
@Input() panelStyleClass: string;
71+
6872
@Input() disabled: boolean;
6973

7074
@Input() readonly: boolean;

showcase/demo/dropdown/dropdown.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,24 @@ <h3>Attributes</h3>
157157
<td>null</td>
158158
<td>Inline style of the element.</td>
159159
</tr>
160+
<tr>
161+
<td>panelStyle</td>
162+
<td>string</td>
163+
<td>null</td>
164+
<td>Inline style of the opening panel element.</td>
165+
</tr>
160166
<tr>
161167
<td>styleClass</td>
162168
<td>string</td>
163169
<td>null</td>
164170
<td>Style class of the element.</td>
165171
</tr>
172+
<tr>
173+
<td>panelStyleClass</td>
174+
<td>string</td>
175+
<td>null</td>
176+
<td>Style class of the opening panel element.</td>
177+
</tr>
166178
<tr>
167179
<td>filter</td>
168180
<td>boolean</td>

0 commit comments

Comments
 (0)