Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card: the subheader property does not display in the template when it is provided #17264

Open
4 tasks
itismohammadreza opened this issue Dec 31, 2024 · 1 comment · May be fixed by #17278
Open
4 tasks

Card: the subheader property does not display in the template when it is provided #17264

itismohammadreza opened this issue Dec 31, 2024 · 1 comment · May be fixed by #17278
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@itismohammadreza
Copy link
Contributor

Describe the bug

The subheader property of the Card component does not display in the template when it is provided.

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/3g67861h

Environment

windows

Angular version

19.0.0

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Add a Card component to your template.
  2. Set the subheader property with a value.
    <p-card header="Simple Card" subheader="Simple Subheader"> </p-card>
  3. Observe that the subheader is not rendered in the template.

Expected behavior

The value of the subheader property should display below the header in the Card component.

@itismohammadreza itismohammadreza added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 31, 2024
honboubao pushed a commit to honboubao/primeng that referenced this issue Jan 2, 2025
@honboubao
Copy link
Contributor

honboubao commented Jan 2, 2025

I just noticed this bug as well.

Current behaviour:

Providing the subheader property doesn't display anything.
Providing the #subtitle template displays the template.
Providing both displays both.

<p-card header="Simple Card">
    <ng-template #subtitle>template-subheader-template</ng-template>
    <p class="m-0">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
        quas!
    </p>
</p-card>

<p-card header="Simple Card" subheader="prop-subheader-prop">
    <p class="m-0">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
        quas!
    </p>
</p-card>

<p-card header="Simple Card" subheader="prop-subheader-prop">
    <ng-template #subtitle>template-subheader-template</ng-template>
    <p class="m-0">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque
        quas!
    </p>
</p-card>

When it should be:

Providing the subheader property displays the property.
Providing the #subtitle template displays the template.
Providing both displays the template.

PR #17278 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants