Skip to content

Commit

Permalink
Merge pull request #13291 from SoyDiego/fix-inplace-closeIcon
Browse files Browse the repository at this point in the history
Fix inplace close icon
  • Loading branch information
cetincakiroglu authored Jul 4, 2023
2 parents 029a59c + d9af349 commit f0f93f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/app/components/inplace/inplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TimesIcon } from 'primeng/icons/times';
class: 'p-element'
}
})
export class InplaceDisplay {}
export class InplaceDisplay { }

@Component({
selector: 'p-inplaceContent',
Expand All @@ -20,7 +20,7 @@ export class InplaceDisplay {}
class: 'p-element'
}
})
export class InplaceContent {}
export class InplaceContent { }
/**
* Inplace provides an easy to do editing and display at the same time where clicking the output displays the actual content.
* @group Components
Expand All @@ -38,8 +38,8 @@ export class InplaceContent {}
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
<ng-container *ngIf="closable">
<button *ngIf="icon" type="button" [icon]="icon" pButton (click)="onDeactivateClick($event)"></button>
<button *ngIf="!icon" type="button" pButton [ngClass]="'p-button-icon-only'" (click)="onDeactivateClick($event)">
<button *ngIf="closeIcon" type="button" [icon]="closeIcon" pButton (click)="onDeactivateClick($event)"></button>
<button *ngIf="!closeIcon" type="button" pButton [ngClass]="'p-button-icon-only'" (click)="onDeactivateClick($event)">
<TimesIcon *ngIf="!closeIconTemplate" />
<ng-template *ngTemplateOutlet="closeIconTemplate"></ng-template>
</button>
Expand Down Expand Up @@ -113,7 +113,7 @@ export class Inplace implements AfterContentInit {

closeIconTemplate: TemplateRef<any> | undefined;

constructor(public cd: ChangeDetectorRef) {}
constructor(public cd: ChangeDetectorRef) { }

ngAfterContentInit() {
this.templates?.forEach((item) => {
Expand Down Expand Up @@ -179,4 +179,4 @@ export class Inplace implements AfterContentInit {
exports: [Inplace, InplaceDisplay, InplaceContent, ButtonModule, SharedModule],
declarations: [Inplace, InplaceDisplay, InplaceContent]
})
export class InplaceModule {}
export class InplaceModule { }
1 change: 0 additions & 1 deletion src/app/showcase/doc/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -11232,7 +11232,6 @@
"optional": false,
"readonly": false,
"type": "boolean",
"default": "false",
"description": "Allows to prevent clicking."
},
{
Expand Down

1 comment on commit f0f93f4

@vercel
Copy link

@vercel vercel bot commented on f0f93f4 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.