implemented the functionality of the pagination during the search for a particular topic in the search bar #1993 #1997
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributing Guidelines Checklist
This is a modified version of, and should adhere to, the Contributing Guidelines.
General Requirements
For Company Additions/Updates
company-profiles/- Required for new additionsAdditional Information
This PR is for solving the issue: #1993
Feature: Search Results Pagination
Adds client‑side pagination to the company search results so users aren’t overwhelmed when a broad term (e.g. a single letter or a technology keyword) returns a large number of companies.
Users can now focus on a manageable subset (25 per page) while refining their search query in the search bar.
Summary of Change
Previously every matching company row was displayed at once. This could lead to:
Pagination (25 results per page) is applied ONLY when a search term is present. With an empty search box, original behavior (show all) is preserved to avoid surprising existing users.
Implementation Details
Updated file:
site/assets/companies-table.jsKey additions inside
setupSearch():RESULTS_PER_PAGE,currentResultIndices,currentPage,totalPages,paginationContainer.currentResultIndicesinstead of immediately toggling row visibility.renderPage(page): Slices visible rows for the active page.buildPaginationControls(): Renders Prev / Next / numbered buttons (+ ellipses for large page counts).removePagination()restores original view when search cleared.What remained unchanged:
Refrences:
Note: Our automated validation system will check your submission and provide feedback. Please address any issues found before requesting review.