gpbl / react-day-picker

DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.
https://daypicker.dev
MIT License
5.88k stars 702 forks source link

fix(types): Add support for props that exist on downstream providers whose props are derived from prop spreading #2073

Closed union-zakbutcher closed 2 months ago

union-zakbutcher commented 3 months ago

Description

Fix for #2072

Type of Change

Checklist

Before submitting your pull request, please make sure the following is done:

Linked Issues

Fixes #2072

Test Plan

I have a project that relies on this repo and I'm currently casting RootProvider as any to avoid this. If this does not resolve the issue I am dedicated to a fix because I like to avoid any at ALL costs

Further Comments

Candidly, I don't know if this will definitely fix the issue, but it silenced any warning / errors on my local machine in VS Code

gpbl commented 2 months ago

Thanks @zakbutcher, looks good to me - indeed the RootContext should have inherited those props too. Good catch!