Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
rc-scroll-pagination
Advanced tools
A react component for pagination with scrolling. It will execute the subscribing function after fetching function. Scroll pagination can listen from different scroll provider (not only from window or first parent as is in the case other packages)
npm install --save rc-scroll-pagination
<ScrollPagination
Loader={<Loader />}
onSubscribe={(params, done) => Meteor.subscribe('myDocs', params, done)}
onFetchData={() => myDocs.find().fetch()}
>
{(item) => {
return <FileItem file={item} height={ROW_HEIGHT} />;
}}
</ScrollPagination>
//Should be done once for every listings
<ScrollProvider>
<main className="col-sm-12 no-side-paddings">
<ScrollPagination onSubscribe onFetchData>
{ (item) => <div>{item.title}</div> }
</ScrollPagination>
</main>
</ScrollProvider>
<ScrollProvider eventName="menuScroll">
<div style={{height: '10000px'}}>
{/* ... */}
</div>
</ScrollProvider>
import {ScrollProvider} from 'rc-scroll-pagination';
//----- Your Component:
constructor () {
// Method that will be observer:
this.updateMe = this.setState.bind(this);
}
componentWillMount () {
//register method from your component as a observer:
ScrollProvider.onScroll(this.updateMe, 'menuScroll', {initialize = true, highPrecision = false});
}
componentWillUnmount () {
//unregister observer methods:
ScrollProvider.offScroll(this.updateMe, 'menuScroll');
}
step
(default 25
) count of loading data per one partLoader
Component for waiting, until data will not be readyItem
Component that renders an item, material-ui/ListItem
by defaultContainer
Component that contains items, material-ui/List
by defaultonSubscribe
(default () => {}
) Callback for moment when data should be subscribed, It must to return object with method stoponFetchData
(required) Callback when data should be fetchedeventName
(default contentScroll
) Name of event for proper scroll providerchildren
(required) Mapper function for rendering of itemseventName
(default contentScroll
) Name of event under scroll will be providedclassName, style
FAQs
A react component for pagination with scrolling.
The npm package rc-scroll-pagination receives a total of 1 weekly downloads. As such, rc-scroll-pagination popularity was classified as not popular.
We found that rc-scroll-pagination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.