Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-pagination-js
Advanced tools
Readme
Simple and light weight pagination for react. This library is updated version of react-pagination-library. It comes with five themes and are easy to customize.
click here for live demo.
$ npm install react-pagination-js
import React from "react";
import Pagination from "react-pagination-js";
import "react-pagination-js/dist/styles.css"; // import css
class App extends React.Component {
state = {
currentPage: 1
};
changeCurrentPage = numPage => {
this.setState({ currentPage: numPage });
//fetch a data
//or update a query to get data
};
render() {
return (
<div>
<Pagination
currentPage={this.state.currentPage}
totalPages={10}
changeCurrentPage={this.changeCurrentPage}
/>
<h2>current Page:{this.state.currentPage}</h2>
</div>
);
}
}
export default App;
Name | Type | Default | Description |
---|---|---|---|
totalSize | Number | Required. Total data size | |
sizePerPage | Number | 10 | Optional. Number of data to display in page |
currentPage | Number | 1 | Required. Active page number |
changeCurrentPage | Function | Required. Page change handler. Receive current pageNumber as arg | |
theme | string | default | Optional. theme : default ,dark , bootstrap , border-bottom , circle |
showFirstLastPages | boolean | true | Optional. Show or hide first and last page. |
firstPageText | string | « | Optional. first page text. |
lastPageText | string | » | Optional. last page text. |
nextPageText | string | ⟩ | Optional. next page text. |
numberOfPagesNextToActivePage | Number | 1 | Optional. Number of page to show next to active page |
FAQs
Simple, light weight pagination for react
The npm package react-pagination-js receives a total of 224 weekly downloads. As such, react-pagination-js popularity was classified as not popular.
We found that react-pagination-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.