Skip to content

Commit

Permalink
Merge pull request #4 from lionix-team/change-html
Browse files Browse the repository at this point in the history
change button tag to a
  • Loading branch information
GHarutyunyan authored Aug 17, 2019
2 parents 05a1eff + d511157 commit 47fb5d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-laravel-paginex",
"version": "2.0.2",
"version": "2.0.3",
"description": "Laravel Pagination with ReactJS (customizable)",
"main": "dist/index.js",
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions src/Pagination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Pagination extends Component {
parameters = this.props.requestParams;
}
parameters.page = page;
console.log('ddd');
this.props.changePage(parameters);
};

Expand Down Expand Up @@ -88,17 +89,17 @@ class Pagination extends Component {
{prevPageUrl ?
<li className={options.prevButtonClass}
onClick={() => this.handleClick(current - 1)}>
<button type="button"
className={options.numberButtonClass}>{options.prevButtonText}</button>
<a href="javascript:void(0)"
className={options.numberButtonClass}>{options.prevButtonText}</a>
</li> : ""}
{rangeWithDots.map((page, index) =>
this.generateNumber(page, index)
)}
{nextPageUrl ?
<li className={options.nextButtonClass}
onClick={() => this.handleClick(current + 1)}>
<button type="button"
className={options.numberButtonClass}>{options.nextButtonText}</button>
<a href="javascript:void(0)"
className={options.numberButtonClass}>{options.nextButtonText}</a>
</li>
: ""}
</ul>
Expand All @@ -113,7 +114,7 @@ class Pagination extends Component {
<li className={this.isCurrent(page) ? options.numberButtonClass + " " + options.activeClass :
options.numberButtonClass}
onClick={() => this.handleClick(page === '...' ? index + 1 : page)} key={index}>
<button type="button" className={options.numberClass}>{page}</button>
<a href="javascript:void(0)" className={options.numberClass}>{page}</a>
</li>
);
}
Expand Down

0 comments on commit 47fb5d1

Please sign in to comment.