Skip to content

Commit

Permalink
getter/setter for header style changes on tabview
Browse files Browse the repository at this point in the history
primefaces#9475
getter/setter for header style changes
should look into the rest of the properties
  • Loading branch information
Feher-Zsofia authored Sep 7, 2023
1 parent 6d50ed2 commit 41ab8d6
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/app/components/tabview/tabview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,24 @@ export class TabPanel implements AfterContentInit, OnDestroy {
* Inline style of the tab header.
* @group Props
*/
@Input() headerStyle: { [klass: string]: any } | null | undefined;
@Input() get headerStyle(): { [klass: string]: any } | null | undefined {
return this._headerStyle;
}
set headerStyle(headerStyle: { [klass: string]: any } | null | undefined) {
this._headerStyle = headerStyle;
this.tabView.cd.markForCheck();
}
/**
* Style class of the tab header.
* @group Props
*/
@Input() headerStyleClass: string | undefined;
@Input() get headerStyleClass(): string | undefined {
return this._headerStyleClass;
}
set headerStyleClass(headerStyleClass: string | undefined) {
this._headerStyleClass = headerStyleClass;
this.tabView.cd.markForCheck();
}
/**
* Whether a lazy loaded panel should avoid getting loaded again on reselection.
* @group Props
Expand Down Expand Up @@ -181,6 +193,10 @@ export class TabPanel implements AfterContentInit, OnDestroy {

view: EmbeddedViewRef<any> | null = null;

_headerStyle: { [klass: string]: any } | null | undefined;

_headerStyleClass: string | undefined;

_selected: boolean | undefined;

_disabled: boolean | undefined;
Expand Down

0 comments on commit 41ab8d6

Please sign in to comment.