https://github.com/sldeaals/table-pagination-exercise
Simple table pagination exercise
https://github.com/sldeaals/table-pagination-exercise
css-in-js react-hooks react-select react-table reactjs
Last synced: 2 days ago
JSON representation
Simple table pagination exercise
- Host: GitHub
- URL: https://github.com/sldeaals/table-pagination-exercise
- Owner: sldeaals
- Created: 2022-08-29T20:07:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-13T23:50:46.000Z (over 3 years ago)
- Last Synced: 2025-01-02T00:42:13.062Z (over 1 year ago)
- Topics: css-in-js, react-hooks, react-select, react-table, reactjs
- Language: JavaScript
- Homepage:
- Size: 194 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# table-pagination-exercise
## Instructions
Create a table that implements pagination.
It should have:
1. Three columns. col1, col2, col3.
2. Fourty one rows. The data will be generated by the generateData function. The data should be the same throughout the component lifecycle.
3. Previous button: Should be enabled only if there's previous data available.
4. Next button: Should be enabled only if there's next data available.
5. Records per page selector: Three sizes: 5, 6, 10. When this value changes, go back to the first page by default.
// This function must be used to generate the data
const generateData = (size) => {
const data = [];
for(let i=0; i