Skip to content
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

Pagination #344

Closed
wants to merge 7 commits into from
Closed

Pagination #344

wants to merge 7 commits into from

Conversation

raj-adi00
Copy link

📋 Description

This PR adds pagination to sort, search and find nearest page in campgrounds. I am displaying total page. And you can go to any page by changing input. If you input exceeds page limit it won't change and it can't below 1. So you can go directly on any page. There is prev and next button to increase pagination by 1 or decrease by 1.
There is one variable in campgrounds.js at controller which is controlling number of items per page. You just need to update that to change number of contents. In my demo video i set it to 3 but in code i am going to commit i have set it to 10. You can change that varialble named campgroundperPage to control number of items in a page.
Also i have disabled map i didn't have map key so it is not visible in my demo video. I have changed the code back so that won't be issue

🔨 Changes Made

I have updated backend code to send data as per page and i have added pagination button. In pagination.js i am controlling all the function.

  • fixes [FEATURE] Adding paging in campgrounds #173
  • Earlier there was isssue that if i choose any sort like printAsc (low to high cost) page reloaded and though results were sorted but it was not showing order. So i have made that if user selects any order then also his selected option or search keyword is visible to him.
  • I am changing the query to get different page results

✅ Checklist

Before submitting the PR, please make sure you have completed the following:

  • [x ] My code follows the style guidelines of this project.
  • [ x] I have performed a self-review of my own code.
  • [x ] I have commented my code, particularly in hard-to-understand areas.
  • [x ] I have made corresponding changes to the documentation (if applicable).
  • [x ] My changes generate no new warnings.
  • [ x] I have tested it locally and it works fine.
  • [x ] Any dependent changes have been merged and published in downstream modules.

🏷️ Types of Changes

What type of changes does your code introduce? (Check all that apply)

  • [x ] Bug fix (non-breaking change which fixes an issue) 🐛
  • [x ] New feature (non-breaking change which adds functionality) ✨
  • UI enhancement (non-breaking change which enhances UI) 🎨
  • Documentation update 📚

🤝 Related Issues

  • Fixes #

📸 Screenshots (if applicable)


Reminder:

Please ensure your pull request is made to the test branch, not main.

Thank you for contributing to VigneshDevHub! We look forward to reviewing your PR and getting it merged!

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. Support us by ⭐starring our repository!

@raj-adi00
Copy link
Author

@Vignesh025 video for that

Pagination.-.Made.with.Clipchamp.1.1.mp4

If you want any change please tell me

@Vignesh025
Copy link
Contributor

@raj-adi00 The pagination is working well, but the cluster map on the campgrounds page isn’t visible.

@raj-adi00
Copy link
Author

raj-adi00 commented Oct 30, 2024

@Vignesh025 I don't have map key so it is not visible because I commented that part which was asking for key. But while pushing i un commented it

@raj-adi00
Copy link
Author

@Sowmiyajayakumar uncommented those lines

@Vignesh025
Copy link
Contributor

@raj-adi00 , Resolve the conflicts.

@raj-adi00
Copy link
Author

@Vignesh025 resolved. Please add label to it

@Vignesh025
Copy link
Contributor

@raj-adi00 The pagination isn’t working now. Could you please check it out?

@raj-adi00
Copy link
Author

@Vignesh025 check it now.

@Vignesh025
Copy link
Contributor

@raj-adi00 The search functionality isn’t working. Please make sure it’s fully functional and working as expected.

@Vignesh025 Vignesh025 closed this Nov 9, 2024
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.

3 participants