Availity / availity-react

React components using Availity UIKit and Bootstrap 4
https://availity.github.io/availity-react
MIT License
52 stars 30 forks source link

feat(phone): initial format value #1447

Closed TheSharpieOne closed 2 months ago

TheSharpieOne commented 2 months ago

Currently when an initial value is provided to the Phone component, it will not format it until the user blurs the field. This can be jarring to the user as the input appears to change when the value didn't.

To resolve this, a new optional prop formatInitialValue was added and defaults to be backwards compatible. When true the initial value will be formatted and set.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (724d834) to head (ddb9aa1). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1447 +/- ## =========================================== + Coverage 92.69% 100.00% +7.30% =========================================== Files 17 3 -14 Lines 534 46 -488 Branches 191 11 -180 =========================================== - Hits 495 46 -449 + Misses 39 0 -39 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.