From 8a0d930de71b9639167264eaedce230f3b51e7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:54:53 +0300 Subject: [PATCH] Fixes #17176, and remove unused prop --- packages/primeng/src/popover/popover.interface.ts | 3 ++- packages/primeng/src/popover/popover.ts | 11 +---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/primeng/src/popover/popover.interface.ts b/packages/primeng/src/popover/popover.interface.ts index 277b65c1874..2ecab8e4645 100644 --- a/packages/primeng/src/popover/popover.interface.ts +++ b/packages/primeng/src/popover/popover.interface.ts @@ -7,8 +7,9 @@ import { TemplateRef } from '@angular/core'; export interface PopoverTemplates { /** * Custom template of content. + * @param {Object} context - closeCallback. */ - content(): TemplateRef; + content(context: { closeCallback: VoidFunction }): TemplateRef<{ closeCallback: VoidFunction }>; /** * Custom template of closeicon. */ diff --git a/packages/primeng/src/popover/popover.ts b/packages/primeng/src/popover/popover.ts index 54f91a3d7fb..9fbc0beecac 100755 --- a/packages/primeng/src/popover/popover.ts +++ b/packages/primeng/src/popover/popover.ts @@ -61,7 +61,7 @@ import { PopoverStyle } from './style/popoverstyle'; >
- +
`, @@ -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 @@ -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'); - } } }