Subject | Hash | Author | Date (UTC) |
---|---|---|---|
disable pagination buttons when min/max reached | a7459260589206aa9430fd9dba67aed2b175607c | antcalatayud | 2018-04-24 15:14:06 |
Manage next/prev pages onclick pagination | 104663344877dc34bc9e3df9762bfad335578d99 | antcalatayud | 2018-04-24 15:09:52 |
Start pagination component | a2600ed30feb02a9394d31215d1218d699371f62 | antcalatayud | 2018-04-24 14:47:05 |
Move Table to new component | 685659283e5fcfb3391bbd7e0988669a4896546b | antcalatayud | 2018-04-24 14:23:39 |
Add eror message | 925f3e3199546d80b90276d53bf3ca827313adab | antcalatayud | 2018-04-24 14:10:51 |
Add loadin component | 54504e3ae117730f625f6c5acf1a10ce912c6146 | antcalatayud | 2018-04-24 14:05:36 |
Create currencies table | a410655fa61df8653b5943cb9c853b04e48c7287 | antcalatayud | 2018-04-24 13:34:35 |
Move some conts outside | 00686f6d20dcc806e20a3d7bfb745517c203dd54 | antcalatayud | 2018-04-24 13:00:43 |
Add AJAX request to list component | 3dd5f784d209cc1cfeb22bbc93aaf2c871e2c69b | antcalatayud | 2018-04-24 12:29:22 |
Start creating list componet | c8bc3d6bb9b4980e1305d401be2fe67c8933a7f8 | antcalatayud | 2018-04-24 10:31:23 |
Add logo | eed8364675e78cfa795550bff03682d49a8ed115 | antcalatayud | 2018-04-24 10:23:07 |
Add styling | 866cbbbc94ce81e8b8b6b88da9f86d2d4153e509 | antcalatayud | 2018-04-24 10:18:43 |
Create fist component and render App | b713ed055b8691a0fd89792d136e0ef9ed86f07c | antcalatayud | 2018-04-24 10:11:22 |
Add init files | d81df9e3d230bcb49f0bb31c43cffad97532d321 | antcalatayud | 2018-04-24 09:51:04 |
Initial commit | 3c3626d89f221374c92ee04aed1eaa8616f3977e | Antonio Calatayud | 2018-04-24 09:03:03 |
File | Lines added | Lines deleted |
---|---|---|
src/components/list/Pagination.js | 11 | 2 |
File src/components/list/Pagination.js changed (mode: 100644) (index dc43a07..da3f90f) | |||
1 | 1 | import React from 'react'; | import React from 'react'; |
2 | import PropTypes from 'prop-types'; | ||
2 | 3 | import './Pagination.css'; | import './Pagination.css'; |
3 | 4 | ||
4 | 5 | const Pagination = (props) =>{ | const Pagination = (props) =>{ |
... | ... | const Pagination = (props) =>{ | |
8 | 9 | <div className="Pagination"> | <div className="Pagination"> |
9 | 10 | <button | <button |
10 | 11 | className="Pagination-button" | className="Pagination-button" |
11 | onClick={() => handlePaginationClick('prev')}> | ||
12 | onClick={() => handlePaginationClick('prev')} | ||
13 | disabled={page <=1}> | ||
12 | 14 | ← | ← |
13 | 15 | </button> | </button> |
14 | 16 | <span className="Pagination-info"> | <span className="Pagination-info"> |
... | ... | const Pagination = (props) =>{ | |
16 | 18 | </span> | </span> |
17 | 19 | <button | <button |
18 | 20 | className="Pagination-button" | className="Pagination-button" |
19 | onClick={() => handlePaginationClick('next')}> | ||
21 | onClick={() => handlePaginationClick('next')} | ||
22 | disabled={page >= totalPages}> | ||
20 | 23 | → | → |
21 | 24 | </button> | </button> |
22 | 25 | </div> | </div> |
23 | 26 | ); | ); |
24 | 27 | } | } |
25 | 28 | ||
29 | Pagination.propTypes = { | ||
30 | totalPages: PropTypes.number.isRequired, | ||
31 | page: PropTypes.number.isRequired, | ||
32 | handlePaginationClick: PropTypes.func.isRequired | ||
33 | }; | ||
34 | |||
26 | 35 | export default Pagination; | export default Pagination; |