Skip to content

Commit c9bc890

Browse files
authored
Merge pull request #47 from ashvin27/custom_pagination_css#19
Custom pagination css#19
2 parents 51e3015 + f4dd1ad commit c9bc890

File tree

4 files changed

+35
-10
lines changed

4 files changed

+35
-10
lines changed

example/dist/index.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23849,12 +23849,20 @@ var UserList = function (_Component) {
2384923849
info: "Showing _START_ to _END_ of _TOTAL_ records",
2385023850
pagination: {
2385123851
first: "First",
23852-
previous: "Previous",
23853-
next: "Next",
23852+
previous: _react2.default.createElement(
23853+
'span',
23854+
null,
23855+
'\u25C4'
23856+
),
23857+
next: _react2.default.createElement(
23858+
'span',
23859+
null,
23860+
'\u25BA'
23861+
),
2385423862
last: "Last"
2385523863
}
2385623864
},
23857-
pagination: "basic", //advance
23865+
pagination: "advance", //advance
2385823866
show_length_menu: true,
2385923867
show_filter: true,
2386023868
show_pagination: true,
@@ -46428,6 +46436,7 @@ function TableFooter(props) {
4642846436
goToPage: props.goToPage,
4642946437
onPageChange: props.onPageChange,
4643046438
onPageBlur: props.onPageBlur }) : _react2.default.createElement(_ADPagination2.default, {
46439+
language: props.config.language,
4643146440
isFirst: props.isFirst,
4643246441
isLast: props.isLast,
4643346442
pages: props.pages,
@@ -46554,6 +46563,8 @@ function ADPagination(props) {
4655446563
var page = props.page_number;
4655546564
var step = 2;
4655646565
var tags = [];
46566+
var pagination = props.language.pagination;
46567+
4655746568

4655846569
var Item = function Item(props) {
4655946570
var className = props.className || "";
@@ -46631,7 +46642,11 @@ function ADPagination(props) {
4663146642
key: "p0",
4663246643
className: props.isFirst ? "disabled " : "",
4663346644
onClick: props.previousPage },
46634-
"\u25C4"
46645+
pagination.previous ? pagination.previous : _react2.default.createElement(
46646+
"span",
46647+
null,
46648+
"\u25C4"
46649+
)
4663546650
));
4663646651

4663746652
if (size < step * 2 + 6) {
@@ -46654,7 +46669,11 @@ function ADPagination(props) {
4665446669
key: "n0",
4665546670
className: props.isLast ? "disabled " : "",
4665646671
onClick: props.nextPage },
46657-
"\u25BA"
46672+
pagination.next ? pagination.next : _react2.default.createElement(
46673+
"span",
46674+
null,
46675+
"\u25BA"
46676+
)
4665846677
));
4665946678

4666046679
return tags;

example/src/UserList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ class UserList extends Component {
9494
info: "Showing _START_ to _END_ of _TOTAL_ records",
9595
pagination: {
9696
first: "First",
97-
previous: "Previous",
98-
next: "Next",
97+
previous: <span>&#9668;</span>,
98+
next: <span>&#9658;</span>,
9999
last: "Last"
100100
}
101101
},
102-
pagination: "basic", //advance
102+
pagination: "advance", //advance
103103
show_length_menu: true,
104104
show_filter: true,
105105
show_pagination: true,

src/components/ADPagination.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default function ADPagination(props){
55
let page = props.page_number;
66
let step = 2;
77
let tags = [];
8+
let { language: { pagination } } = props
89

910
let Item = function(props) {
1011
let className = (props.className) || "";
@@ -45,7 +46,9 @@ export default function ADPagination(props){
4546
key="p0"
4647
className={(props.isFirst ? "disabled " : "")}
4748
onClick={props.previousPage}>
48-
&#9668;
49+
{pagination.previous
50+
? pagination.previous
51+
: <span>&#9668;</span>}
4952
</Item>
5053
)
5154

@@ -67,7 +70,9 @@ export default function ADPagination(props){
6770
key="n0"
6871
className={props.isLast ? "disabled " : ""}
6972
onClick={props.nextPage}>
70-
&#9658;
73+
{pagination.next
74+
? pagination.next
75+
: <span>&#9658;</span>}
7176
</Item>);
7277

7378
return tags;

src/components/TableFooter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function TableFooter(props){
3131
onPageBlur={props.onPageBlur} />
3232
) : (
3333
<ADPagination
34+
language={props.config.language}
3435
isFirst={props.isFirst}
3536
isLast={props.isLast}
3637
pages={props.pages}

0 commit comments

Comments
 (0)