Skip to content

Added keep length parameter #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 22, 2023
Merged

Conversation

QuentiumYT
Copy link
Contributor

Hello, I recently found this projet and it really does well the job!

For user interface purposes, I needed to keep the same number of items in the pagination. Currently, when we're at page 1, it shows 4 more items on the right (2, 3, ..., 20). Seems normal not having on the left but once it's set to 10 for example, we do have 4 more elements on the left (1, ..., 8, 9) which doubles almost the length.

Screenshot from 2023-03-20 10-34-22

Before:
Screenshot from 2023-03-20 10-34-31

After:
Screenshot from 2023-03-20 10-34-45

As you can see, "after" shows 11 elements all the time, and not only at the beginning and the end.

This prop is not set to true by default to prevent package updates compatibility but I find it interesting to have. (Also, I didn't added tests (not really good at it) but feel free to do so 😃)

Thanks for having a look at it!

@vercel
Copy link

vercel bot commented Mar 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
laravel-vue-pagination ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 22, 2023 at 11:51AM (UTC)

@what-the-diff
Copy link

what-the-diff bot commented Mar 20, 2023

PR Summary

  • Added keepLength prop to pagination components - This update adds a new feature to maintain consistent length in all pagination components.
  • Updated documentation - The docs now include the new keepLength prop and provide examples for better understanding.
  • Fixed last page bug in TailwindPagination component - Resolved an issue that prevented the final page from displaying when using the "show all pages" option in the TailwindPagination component.

@QuentiumYT QuentiumYT changed the title Added keep lenght parameter Added keep length parameter Mar 20, 2023
@gilbitron
Copy link
Owner

@QuentiumYT This looks like a great PR. Thanks 👍 Just one issue, tests and builds are failing with:

warning Lockfile has incorrect entry for "[email protected]". Ignoring it.
error Couldn't find any versions for "vuepress-vite" that matches "2.0.0-beta.50-pre.1"

@QuentiumYT
Copy link
Contributor Author

Yeah had some issues with yarn when installing the dependencies. Will try to fix it :)

@QuentiumYT
Copy link
Contributor Author

QuentiumYT commented Mar 22, 2023

There were an issue about this version of vuepress (probably renamed or deleted from dependencies) and fixed it in the lockfile to force using the latest with correct vuepress-vite dependency version. (yarn add -D vuepress@next)
Refering to vuejs/vuepress#3096

@gilbitron
Copy link
Owner

Thanks 👍

@gilbitron gilbitron merged commit 4baf867 into gilbitron:master Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants