Skip to content

Commit

Permalink
Fixes #17176, and remove unused prop
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Dec 23, 2024
1 parent 516e7e9 commit 8a0d930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 2 additions & 1 deletion packages/primeng/src/popover/popover.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { TemplateRef } from '@angular/core';
export interface PopoverTemplates {
/**
* Custom template of content.
* @param {Object} context - closeCallback.
*/
content(): TemplateRef<any>;
content(context: { closeCallback: VoidFunction }): TemplateRef<{ closeCallback: VoidFunction }>;
/**
* Custom template of closeicon.
*/
Expand Down
11 changes: 1 addition & 10 deletions packages/primeng/src/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import { PopoverStyle } from './style/popoverstyle';
>
<div class="p-popover-content" (click)="onContentClick($event)" (mousedown)="onContentClick($event)">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate"></ng-container>
<ng-template *ngTemplateOutlet="contentTemplate || _contentTemplate; context: { closeCallback: onCloseClick.bind(this) }"></ng-template>
</div>
</div>
`,
Expand Down Expand Up @@ -111,11 +111,6 @@ export class Popover extends BaseComponent implements AfterContentInit, OnDestro
* @group Props
*/
@Input({ transform: booleanAttribute }) dismissable: boolean = true;
/**
* When enabled, displays a close icon at top right corner.
* @group Props
*/
@Input({ transform: booleanAttribute }) showCloseIcon: boolean | undefined;
/**
* Inline style of the component.
* @group Props
Expand Down Expand Up @@ -345,10 +340,6 @@ export class Popover extends BaseComponent implements AfterContentInit, OnDestro

if (containerOffset.top < targetOffset.top) {
addClass(this.container, 'p-popover-flipped');

if (this.showCloseIcon) {
this.renderer.setStyle(this.container, 'margin-top', '-30px');
}
}
}

Expand Down

0 comments on commit 8a0d930

Please sign in to comment.