From 964df61284882ea438377f41f8dc1c20eebfe496 Mon Sep 17 00:00:00 2001 From: Daniel Cortes Date: Thu, 4 Jun 2020 20:12:28 -0400 Subject: [PATCH] Paginate no ejecuta gotopage si es que es hacia la pagina actual --- TODO.md | 1 - src/components/Paginate.jsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 975df63..f227626 100644 --- a/TODO.md +++ b/TODO.md @@ -1,2 +1 @@ Searchbar tendria que hacer callback de la query que se ejecuto, no ejecutarla el mismo -Si es que se hace click en el link actio del paginate, se borran los resultados y no se ven diff --git a/src/components/Paginate.jsx b/src/components/Paginate.jsx index 0861b7a..a177e31 100644 --- a/src/components/Paginate.jsx +++ b/src/components/Paginate.jsx @@ -54,7 +54,7 @@ export default class Paginate extends Component { handleClick(page) { return (evt) => { evt.preventDefault(); - this.gotoPage(page); + if(this.state.currentPage !== page) this.gotoPage(page); } }