Build generic pagination component
Created by: ri-pandey
Currently, pagination is used by three views:
- Datasets view
- Workflows view
- Project-datasets view (coming soon)
Enabling pagination on a set of results needs a good deal of boilerplate logic, which can be refactored into a single component, instead of duplicating it in the three views above.
Requirements:
-
The pagination component should not force client to use a particular type of view for displaying the results (Datasets and Project-datasets views use
<va-data-table/>
for displaying paginated results, whereas the Workflows view uses regular<div/>
elements). One way of doing this would be having the generic Pagination component emit an event when the retrieval query changes, which a parent component can hook into, and trigger a network call to fetch results based on the updated retrieval query. -
The pagination component should allow for filtering, searching through, and sorting the results. Enrolling in these behaviors should be optional for the client.