react-component / picker

📅 All Date Pickers you need.
https://picker.react-component.now.sh/
MIT License
257 stars 295 forks source link

fix: ref execute the onBlur method #782

Closed LiuBairin closed 1 month ago

LiuBairin commented 3 months ago

在开发过程中我希望通过ref上的blur方法使rangePicker关闭,发现并没有作用,阅读源码发现是onBlur方法没有调用导致的

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
picker ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 5:56am
codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 98.58%. Comparing base (3077545) to head (4eb89f0). Report is 17 commits behind head on master.

:exclamation: Current head 4eb89f0 differs from pull request most recent head e0d6bb1. Consider uploading reports for the commit e0d6bb1 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #782 +/- ## ======================================= Coverage 98.58% 98.58% ======================================= Files 63 63 Lines 2542 2543 +1 Branches 676 701 +25 ======================================= + Hits 2506 2507 +1 Misses 33 33 Partials 3 3 ```

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

afc163 commented 1 month ago

你应该使用 open 来控制弹窗关闭,而不是用 blur。

LiuBairin commented 1 month ago

是这样的 在3.5x版本的时候我自定义renderExtraFooter 并定义了一个确定按钮 调用ref的blur方法是可以关闭的

afc163 commented 1 month ago

调用ref的blur方法是可以关闭的

这是非预期和不稳定的,官方推荐的方式是用 open 来控制弹窗关闭。

LiuBairin commented 1 month ago

👌好的,谢谢