select
select copied to clipboard
fix: Pressing up with all options disabled underflowing
Previously if you had a select with all options disabled, pressing up arrow would make current
< 0 so memoFlattenOptions[current]
would be undefined. Multiplying len
by 2 is an easy way to make sure it wraps around gracefully.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/react-component/select/DWYKAXc2fHeuGXXK5B7gvxHPQJLy
✅ Preview: https://select-git-fork-nathan-knight-fix-option-51dae0-react-component.vercel.app
Codecov Report
Merging #712 (598f1c4) into master (452d917) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #712 +/- ##
=======================================
Coverage 99.50% 99.50%
=======================================
Files 25 25
Lines 1010 1010
Branches 335 335
=======================================
Hits 1005 1005
Misses 4 4
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
src/OptionList.tsx | 99.28% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 452d917...598f1c4. Read the comment docs.