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

Panel: No obvious equivalent of deprecated [showHeader]="false" #17763

Open
1 of 4 tasks
alaindeurveilher opened this issue Feb 24, 2025 · 0 comments
Open
1 of 4 tasks
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@alaindeurveilher
Copy link

Describe the bug

I see that showHeader property is marked deprecated in favour of the headericons template:

    /**
     * Expand icon of the toggle button.
     * @group Props
     * @deprecated since v15.4.2, use `headericons` template instead.
     */
    @Input() expandIcon: string | undefined;
    /**
     * Collapse icon of the toggle button.
     * @group Props
     * @deprecated since v15.4.2, use `headericons` template instead.
     */
    @Input() collapseIcon: string | undefined;
    /**
     * Specifies if header of panel cannot be displayed.
     * @group Props
     * @deprecated since v15.4.2, use `headericons` template instead.
     */
    @Input({ transform: booleanAttribute }) showHeader: boolean = true;

But I think it is mistake as there is no equivalent using this template, nor the header template, to achieve the design of the panel in the middle in the example below, using [showHeader]="false":

Image

Using the showHeader input we design a nice panel with correct padding at the top and bottom. Without using that input, the panel displays too much padding at the top (because the header section is actually rendered, even if it's empty)

I wonder then if marking that input prop deprecated was kind of mistake, since the suggestion to use headericons template has nothing to do with the whole header and the goal of showHeader, on the contrary of the 2 other input props.

If it is really is deprecated, then what should we do instead to render a panel without a header section, as the middle one in my example?

Thank you.

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

Need feedback from the team.

Reproducer

https://stackblitz.com/~/github.com/alaindeurveilher/angular-primeng

Environment

Angular 19 and primeng 19

Angular version

19.1.0

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

create a p-panel without header

Expected behavior

Render a panel with the right padding spaces top and bottom.

@alaindeurveilher alaindeurveilher added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 24, 2025
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

No branches or pull requests

1 participant