akiran / akiran/react-slick

Problem with paging

Aperta
#1,500 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi, I'm trying to call a function everytime I click on a page of Slick. I could do it but I've found that they work together. I'll get you in context showing my code:

```
const show = (element) => console.log(element);
...
const settings = {
customPaging: (i) => {
return (


{i + 1}

);
},
...
```
If I click to any of the pages, I don't know why it shows all the values on the console. I would like to show just the value of the item that I'm clicking. For example, if I'm clicking to the page 3 I want to show on the console a '3'.

Do you know how could I do it? Thanks!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.