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

Closed
4 tasks
itismohammadreza opened this issue Dec 31, 2024 · 1 comment · Fixed by #17278
Closed
4 tasks
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

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.

@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 15, 2025
@mertsincan mertsincan added this to the 19.0.6 milestone Jan 15, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Jan 15, 2025
mertsincan pushed a commit that referenced this issue Jan 15, 2025
Co-authored-by: Christian Tu <christian.tu@pv.at>
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeNG Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants