Skip to content

Commit

Permalink
fix(tabs): fix issue primefaces#16521 - close button not working with…
Browse files Browse the repository at this point in the history
… ripple effect
  • Loading branch information
wS2Zth committed Oct 12, 2024
1 parent b33aa8a commit d71095f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion src/app/components/tabs/style/tabsstyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ const theme = ({ dt }) => `
background: ${dt('tabs.active.bar.background')};
transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);
}
.p-tabview-close {
z-index: 1;
}
`;

const classes = {
Expand Down Expand Up @@ -208,6 +212,10 @@ export enum TabsClasses {
* Class name of the tab panel element
*/
tabpanel = 'p-tabs-panel',
/**
* Class name of the close icon
*/
tablose = 'p-tabview-close',
}

export interface TabsStyle extends BaseStyle {}
export interface TabsStyle extends BaseStyle { }
8 changes: 4 additions & 4 deletions src/app/components/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export class TabPanel extends BaseComponent implements AfterContentInit, OnDestr
@if (tab.closeIconTemplate) {
<ng-template *ngTemplateOutlet="tab.closeIconTemplate"></ng-template>
} @else {
<TimesIcon (click)="close($event, tab)" />
<TimesIcon class="p-tabview-close" (click)="close($event, tab)" />
}
}
}
Expand Down Expand Up @@ -700,7 +700,7 @@ export class Tabs extends BaseComponent implements AfterContentInit, AfterViewCh

return headerElement
? DomHandler.getAttribute(headerElement, 'data-p-disabled') ||
DomHandler.getAttribute(headerElement, 'data-pc-section') === 'inkbar'
DomHandler.getAttribute(headerElement, 'data-pc-section') === 'inkbar'
? this.findNextHeaderAction(headerElement)
: headerElement
: null;
Expand All @@ -711,7 +711,7 @@ export class Tabs extends BaseComponent implements AfterContentInit, AfterViewCh

return headerElement
? DomHandler.getAttribute(headerElement, 'data-p-disabled') ||
DomHandler.getAttribute(headerElement, 'data-pc-section') === 'inkbar'
DomHandler.getAttribute(headerElement, 'data-pc-section') === 'inkbar'
? this.findPrevHeaderAction(headerElement)
: headerElement
: null;
Expand Down Expand Up @@ -903,4 +903,4 @@ export class Tabs extends BaseComponent implements AfterContentInit, AfterViewCh
imports: [Tabs, TabPanel],
exports: [Tabs, TabPanel, SharedModule],
})
export class TabsModule {}
export class TabsModule { }

0 comments on commit d71095f

Please sign in to comment.