cisco-sbg-ui / atomic-react

https://atomic-react.security.cisco.com
2 stars 5 forks source link

feat: add infinite scrolling to ADataTable #1174

Closed brennarvo closed 2 years ago

brennarvo commented 2 years ago

Please check if the PR fulfills these requirements

What kind of change does this PR introduce?

What is the current behavior?

The ADataTable does not have functionality to support infinite scrolling.

What is the new behavior (if this is a feature change)?

Leverages the [Intersection Observer API]() in order to determine when the last row in the table is being viewed, which enables an external consumer of Atomic React to run a function that would (hypothetically) call the next batch of data table.

Does this PR introduce a breaking change?

No

Other Information

vercel[bot] commented 2 years ago

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/securex/atomic-react/6ed8pnrwVyAsB7frwZhLeAGhFbYE
✅ Preview: https://atomic-react-git-feat-infinite-scroll-securex.vercel.app

codecov[bot] commented 2 years ago

Codecov Report

Merging #1174 (78bd0fc) into master (34f5896) will increase coverage by 0.11%. The diff coverage is 90.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1174      +/-   ##
==========================================
+ Coverage   90.14%   90.25%   +0.11%     
==========================================
  Files          97       98       +1     
  Lines        2973     3048      +75     
  Branches     1032     1049      +17     
==========================================
+ Hits         2680     2751      +71     
- Misses        250      255       +5     
+ Partials       43       42       -1     
Impacted Files Coverage Δ
framework/utils/hooks.js 86.36% <86.27%> (+2.36%) :arrow_up:
framework/utils/helpers.js 90.00% <88.88%> (-0.91%) :arrow_down:
framework/components/AInView/AInView.js 90.00% <90.00%> (ø)
framework/components/ADataTable/ADataTable.js 100.00% <100.00%> (ø)
framework/components/ALoader/ADotLoader.js 83.33% <0.00%> (+50.00%) :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 34f5896...78bd0fc. Read the comment docs.