Issues:
- Limited pagination: The backend returns data in sets of 10, making it impossible to load all customers into a dropdown menu at once.
- Maximum limit: The backend has a maximum limit (e.g., 50), meaning not all customers can be retrieved in a single request.
- UI challenges: Implementing pagination in a dropdown menu may result in a less intuitive user experience.
Solutions:
- "Load More" approach:
- The first request retrieves 50 customers using
page=1&amount=50
.
- Clicking "Load More" triggers another request with
page=2&amount=50
, and so on.
- Pros: Keeps the UI simple and responsive.
- Cons: Users need to click multiple times to load all data.
- Popup with a table view:
- Instead of a dropdown menu, a popup appears with a paginated table.
- The table includes filters and navigation to browse customers efficiently.
- Pros: Suitable for large datasets and provides better filtering and search options.
- Cons: The UI may appear less appealing or intuitive compared to a dropdown menu.
The best approach depends on balancing user experience with performance optimization.