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

Dropdown: selectedItem Template dropdown with no placeholder size is off #15422

Closed
ethanolree opened this issue May 1, 2024 · 2 comments
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ethanolree
Copy link

Describe the bug

When using a Dropdown component in combination with a selectedItem template, if there is no placeholder, the height of the dropdown is off.

Here is a screenshot example. Both dropdowns have a selectedItem template, however, only the first has a placeholder
image

Environment

N/A

Reproducer

No response

Angular version

17.3.1

PrimeNG version

17.15.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Dropdown height should be the same regardless of having a placeholder or not

@ethanolree ethanolree added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 1, 2024
@adri95cadiz
Copy link

adri95cadiz commented May 9, 2024

I use these two rules to workaround this, in case this solves the problem for you. Anyways it would be good if it could be fixed.

  p-dropdown > .p-dropdown .p-dropdown-label:empty::before {
    content: '\0000a0';
  }

  p-dropdown
    > .p-dropdown
    .p-dropdown-label:has({identifier for the item in your dropdown selectedItem template})
    span[class='ng-star-inserted'] {
    display: none;
  }

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

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

3 participants