primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.24k stars 965 forks source link

Float Label not detect default values using React Hook Form #6821

Open kchojhu opened 1 week ago

kchojhu commented 1 week ago

Describe the bug

When using React Hook Form with default values. The float label still display inside the input field and it does not detect that input value have been filled. The default value is displayed in the Input Text field but now they are overlapping 'unfilled' float label and the value inside.

Reproducer

No response

PrimeReact version

10.6.6

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Use React Hook Form with Default values
  2. Use Float Label for Input fields
  3. You will notice that Float Label and the values are overlapping.

Expected behavior

When using default values, the float label should in 'filled' mode where the label should move to top of the input field.

github-actions[bot] commented 1 week ago

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.