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

Floating label for dropdown control with placeholder #12750

Closed
flawesomesoft opened this issue Mar 14, 2023 · 2 comments
Closed

Floating label for dropdown control with placeholder #12750

flawesomesoft opened this issue Mar 14, 2023 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@flawesomesoft
Copy link

Describe the bug

When using a floatlabel for a dropdown control there is a strange behaviour when adding a placeholder.

The opacity for .p-float-label .p-placeholder is set to 0.
When you click inside the dropdown control it is set to 1.

This could be connected to a prior bugfix for issue #11508

Refer also the the linked stackblitz for a showcase of the issue.

Environment

Using Angular 14 with PrimeNG components tested on Chrome and Firefox

Reproducer

https://stackblitz.com/edit/github-wtcruv-w4ls4t?file=src/app/app.component.html

Angular version

14.2.10

PrimeNG version

14.2.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.19.0

Browser(s)

Chrome, Firefox

Steps to reproduce the behavior

Creating a float label for dropdown control and adding a placeholder.

By default the placeholder is hidden.
When you click inside the dropdown control the placeholder is visible.

Refer to linked stackblitz for a showcase of the issue.

Expected behavior

Floating label for a dropdown control should behave like for a input control as long as no entry was selected in the dropdown.

@flawesomesoft flawesomesoft added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 14, 2023
@flawesomesoft flawesomesoft changed the title Floating label for dropdown control with with placeholder Floating label for dropdown control with placeholder Mar 14, 2023
@flawesomesoft
Copy link
Author

My current workaround is setting the opacity to 1 via CSS styling.

::ng-deep some-component-selector {
.p-float-label .p-placeholder {
  opacity: 1;
}

The input control

@mehmetcetin01140
Copy link
Contributor

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

2 participants