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

FloatLabel/Select: Issues when select value is string, then float label is over the Value #16856

Closed
NiBurhe opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@NiBurhe
Copy link

NiBurhe commented Nov 26, 2024

Describe the bug

When you have a float-label and a select. The select has options with value as string, then the float label is not on

image

<p-floatlabel variant="on"> <p-select id="inputId" optionLabel="label" optionValue="value" [formControl]="control" [fluid]="true" [options]="options" /> <label for="inputId">Test</label> </p-floatlabel>

control = new FormControl<string>('b') options = [{label: 'a', value: 'a'}, {label: 'b', value: 'b'}]

When the value is a number it works fine

Environment

Angular 18

Reproducer

https://github.com/NiBurhe/primeng-issue-template/tree/NiBurhe/public/src

Angular version

18.2.9

PrimeNG version

18.0.0-rc.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.18.0

Browser(s)

Chrome 130.0.6723.117

Steps to reproduce the behavior

As long you have the focus everything is fine, but when the focus is gone, then the label is over the value again.

Expected behavior

Label always on the select, when a value is selected

@NiBurhe NiBurhe added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 26, 2024
@NiBurhe NiBurhe changed the title Component: Title FloatLabel/Select: Issues when select value is string, then float label is over the Value Nov 26, 2024
@RichardMcElroy
Copy link

I've also got this with the default variant 'over' when the value of options is a string

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 28, 2024
@mertsincan mertsincan added this to the 18.0.0.Final milestone Nov 28, 2024
mehmetcetin01140 added a commit that referenced this issue Dec 3, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Dec 3, 2024
mehmetcetin01140 added a commit that referenced this issue Dec 3, 2024
Fixed #16856 | FloatLabel/Select: Issues when select value is string,…
@mehmetcetin01140 mehmetcetin01140 moved this to Done in PrimeNG Dec 3, 2024
@mehmetcetin01140 mehmetcetin01140 closed this as completed by moving to Done in PrimeNG Dec 3, 2024
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

No branches or pull requests

4 participants