Skip to content

Add basic pagination

Eric Gardner requested to merge pagination into main
  • Updates the ResultsView component to support pagination. This is done by adding a new computed property, "displayedResults", which is a slice of the "articles" array that gets retrieved from the API. The component also manages a ref for "currentPage" and a computed property for "totalPages" (the latter is calculated by dividing the total number of results by the RESULTS_PER_PAGE constant). Since all the data has already been fetched, page changes are instant.
  • Makes a few small updates to the Pagination component.
Edited by Eric Gardner

Merge request reports