Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.89k stars 2.23k forks source link

fix DatePikcerProps #4932

Open yuki0410-dev opened 1 week ago

yuki0410-dev commented 1 week ago

Description

Linked issue: closes #4922

Problem See issue

Changes

Contribution checklist

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 71.05263% with 11 lines in your changes missing coverage. Please review.

Project coverage is 96.35%. Comparing base (f90932c) to head (ee69d7b).

Files Patch % Lines
src/index.tsx 71.05% 11 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4932 +/- ## ========================================== - Coverage 96.67% 96.35% -0.32% ========================================== Files 28 28 Lines 3275 3295 +20 Branches 1357 1392 +35 ========================================== + Hits 3166 3175 +9 - Misses 109 116 +7 - Partials 0 4 +4 ```

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

martijnrusschen commented 5 days ago

it looks like the test coverage took a hit, can you review this?

yuki0410-dev commented 4 days ago

@martijnrusschen I just formally describe the fallback because defaultProps is not reflected in the type well, and I can't actually get the code to pass here. (I can write this code well if it is a function Component instead of a Class Component.) A similar case occurred during the typescript transition, and we believe that it cannot be helped.