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

Open
NiBurhe opened this issue Nov 26, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

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
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