react-endless-paging-footer

1.3.1 • Public • Published

react-endless-paging-footer

A react component for a footer with a message and a button to load more

Usage

var Footer = require("Footer");
 
...
 
function doLoadMore () {
    // do magic here...
}
 
// Do this if you want your messages built for you (only in spanish by now...)
<Footer itemName={"person"} itemsName={"people"} shownRows={5} totalRows={10} buttonText="Cargar más" onLoadMore={doLoadMore} />
 
// Or do this to build the messages yourself
<Footer message="Showing 5 items of 10" buttonText="Load more" onLoadMore={doLoadMore} />

Optional "load all" button

Now you have the option of adding a "load all" button, just provinding the label and callback it needs. For example:

<Footer itemName={"person"} itemsName={"people"} shownRows={5} totalRows={10} buttonText="Cargar más" onLoadMore={doLoadMore} buttonAllText="Cargar todos" onLoadAll={doLoadAll} />

Package Sidebar

Install

npm i react-endless-paging-footer

Weekly Downloads

8

Version

1.3.1

License

MIT

Last publish

Collaborators

  • luispablo