Closed clauderic closed 6 years ago
Merging #55 into master will increase coverage by
0.12%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 94.16% 94.28% +0.12%
==========================================
Files 3 3
Lines 137 140 +3
Branches 17 17
==========================================
+ Hits 129 132 +3
Misses 8 8
Impacted Files | Coverage Δ | |
---|---|---|
src/index.tsx | 100% <100%> (ø) |
:arrow_up: |
src/constants.ts | 100% <100%> (ø) |
:arrow_up: |
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 6d3e8a3...e881d57. Read the comment docs.
Would be awesome to get this PR in, let me know if I can help at all.
@clauderic do you need any help getting this over the finish line? I would love to move this in the Evergreen component library.
👍 Thanks @clauderic!
This PR adds a
stickyIndices
prop to add support for sticky headers:The prop accepts an array of indices that should be made sticky (eg,
stickyIndices={[0, 20, 50, 100]}
)The solution relies on
position: sticky
, so it will only work in browsers that support that feature, but will degrade gracefully for other browsers.It also works with horizontal lists:
How to test locally
Clone the project and check out this branch. Run
yarn
followed bynpm start
.To-do
stickyIndices