FloatLabel/Select: Issues when select value is string, then float label is over the Value #16856
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
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-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
The text was updated successfully, but these errors were encountered: