Open NiBurhe opened 4 days ago
When you have a float-label and a select. The select has options with value as string, then the float label is not on
` <p-select id="inputId" optionLabel="label" optionValue="value" [formControl]="control" [fluid]="true" [options]="options" />
`
control = new FormControl<string>('b') options = [{label: 'a', value: 'a'}, {label: 'b', value: 'b'}]
When the value is a number it works fine
Angular 18
https://github.com/NiBurhe/primeng-issue-template/tree/NiBurhe/public/src
18.2.9
18.0.0-rc.1
Angular CLI App
TypeScript
20.18.0
Chrome 130.0.6723.117
As long you have the focus everything is fine, but when the focus is gone, then the label is over the value again.
Label always on the select, when a value is selected
I've also got this with the default variant 'over' when the value of options is a string
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
`
<p-select
id="inputId"
optionLabel="label"
optionValue="value"
[formControl]="control"
[fluid]="true"
[options]="options"
/>
`
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