Skip to content

Convert pagination component to composition API

Jkieserman requested to merge updated-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.

Merge request reports