fix: add tab loop to datepicker with withPortal
I'm currently using this date picker with the withPortal prop. I noticed that currently, when rendered like this, there is no TabLoop enabled at all which allows you to tab out of the date picker under the overlay. This PR uses the TabLoop component to wrap the portal's contents.
This PR also adds a keyDown handler to allow to close the date picker using the Escape key. (It was ignored previously, particularly when focus was in the header).
Codecov Report
Merging #3648 (5b0b16a) into master (79a61c3) will decrease coverage by
0.27%. The diff coverage is0.00%.
@@ Coverage Diff @@
## master #3648 +/- ##
==========================================
- Coverage 93.34% 93.06% -0.28%
==========================================
Files 20 20
Lines 1352 1356 +4
Branches 377 378 +1
==========================================
Hits 1262 1262
- Misses 27 31 +4
Partials 63 63
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/index.jsx | 88.70% <0.00%> (-1.20%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 79a61c3...5b0b16a. Read the comment docs.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.