Skip to content

Block UI doesn't work with Card with ngtemplate #header #19276

@FRahman-MaxetaTech

Description

@FRahman-MaxetaTech

Describe the bug

If you have a block-ui targeting a p-card that has an ng-template header, the mask of the block ui will only cover the header when active, rather than the entire card.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-mcrhc27f?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,package.json

Environment

This was found in Angular 21.0.5 running primeng 21.0.2 and replicated in primeng 20.3.0.

Angular version

20/21

PrimeNG version

v21

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a p-card and give it a selector #temp
  2. Inside the p-card, create a header using an ng-template, ex. <ng-template #header> header </ng-template>
  3. Create a block ui and set its [target] equal to temp.
  4. Either set the block ui's blocked property to true.

Expected behavior

The block ui's mask should appear over the entire component. This is what happens when you replace card with panel, or get rid of the ng-template header.

Metadata

Metadata

Labels

LTS-PORTABLEIssue's fix will be ported to supported LTS versionsResolution: Needs More InformationMore information about the issue is needed to find a correct solutionType: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions