Replies: 2 comments
-
Un deuxième élément intéressant, ce serait d'exporter le type Page type Page = { href?: string, label: string, title: string } |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ce sera fait dans la prochaine version : tous les types de toutes les props et autres types utilisés seront exportées |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello !
Tout d'abord, vraiment top le DsfrPagination 👍
Mais il manque un petit quelque chose pour le rendre parfait.
Tout d'abord, je n'aurai pas mis dans le storybook l'usage de v-model sur la props currentPage
Car ça entraine des update de currentPage même si on ne bouge pas d'index (cliquer sur la lastPage alors qu'on y est déjà, ou recliquer sur la page actuelle, etc...)
Alors se pose la question, est-ce que c'est la responsabilité du DsfrPagination de dire si le clique change la currentPage ou non ?
Question complexe, car certains pourrait vouloir que chaque clique puisse être écouté même si la valeur reste identique.
Plusieurs solutions alors:
Exemple de l'usage du composant
Beta Was this translation helpful? Give feedback.
All reactions